User Tools

Site Tools


user:loggy:misc

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
user:loggy:misc [2023/01/02 17:08]
jonarbuckle Whitespace for easier readability!
user:loggy:misc [2023/12/12 13:05] (current)
loggy digging for the apostasy bug
Line 2: Line 2:
  
 <color #666666>(gray items have already been incorporated into proper wiki pages)</color> <color #666666>(gray items have already been incorporated into proper wiki pages)</color>
- 
-  * affliction 2^40 makes you take 1 AN internal damage. Being undead makes it go up to 2. If you are taking 1, it has a 20% chance to end 
  
   * <color #666666>Hell power is 20% + 2% per mark to spawn a horror. It spawns in a random square in a 5x5 grid around you</color>   * <color #666666>Hell power is 20% + 2% per mark to spawn a horror. It spawns in a random square in a 5x5 grid around you</color>
  
-  * web is str + DRN vs 22, win means you break free+  * CATEGORY Check to Win Things: 
 +    * web is str + DRN vs 22, win means you break free 
 +    * Affliction 2^50 (netted?) is str + DRN vs 20 
 +    * False fetters is MR + DRN vs 20, win to escape 
 +    * Slime is 22 
 +    * size/strength negate: 5+6 always immune, 4 is 66% to ignore, 3 is 33% to ignore, otherwise roll strength vs 14 + d20 (no DRN or openended). If strength wins (not ties) it is negated 
 +    * <color #666666>Having the blink unit effect means you always successfully escape entangle, web, net, earth grip (but not bonds of fire or false fetters)</color>
  
-  * <color #666666>Having the blink unit effect means you always successfully escape entangleweb, net, earth grip (but not bonds of fire or false fetters)</color>+  * CATEGORY Decompiler Nerd Things: 
 +    * Effect modifier 4611686018427387904 is 1/3 strength added 
 +    * Spec 0x100000000000000 or 72057594037927936 readds magic damage  
 +    * 0x4000000000000000 or 4611686018427387904 adds 1/3 strength 
 +    * 0x800000000 or 34359738368 is added to all effects with aoe 
 +    * 0x40000000 or 1073741824 is simply added to all spells 
 +    * 144115188075855872 makes projectiles stick to the ground rather than fly normally 
 +    * 0x400000000 or 17179869184 is weapon #range050 
 +    * 0x8000000000000 or 2251799813685248 may be for flaming projectiles 
 +    * 141837069189120 is not construct immuneit actually prevents the user hitting themselves (but doesn't work on x% field AoEs)
  
-  * Affliction 2^50 (netted?) is str + DRN vs 20 
  
-  * False fetters is MR + DRN vs 20, win to escape+  * CATEGORY Behavior Afflictions: 
 +    * Rage: 50% chance to attack a random adjacent square 
 +    * Dementia: 25% to make units do nothing for 3650 ticks 
 +    * Confusion: 30% to stand and do nothing, 20% to attack a random adjacent square 
 +    * Stupid: 10% chance to do nothing (and wait for half a round)10% to attack something adjacent at random.
  
-  * Slime is 22 
  
   * Unknown affliction 2^38 is cleared every combat round and doesn't do anything when that happens   * Unknown affliction 2^38 is cleared every combat round and doesn't do anything when that happens
 +
 +  * affliction 2^40 makes you take 1 AN internal damage. Being undead makes it go up to 2. If you are taking 1, it has a 20% chance to end
  
   * <color #666666>Commanders have a 50% chance to smart retreat. If they don't, they have make a morale check vs 10 to smart retreat. If they fail that and have appropriate survivals there's a 50% chance to still be smart</color>   * <color #666666>Commanders have a 50% chance to smart retreat. If they don't, they have make a morale check vs 10 to smart retreat. If they fail that and have appropriate survivals there's a 50% chance to still be smart</color>
Line 30: Line 47:
   * <color #666666>Blood popkill is 10*floor%%((slaves + 4)/5)%%</color>   * <color #666666>Blood popkill is 10*floor%%((slaves + 4)/5)%%</color>
  
-  * Manifestation checks at most 8 random commanders. It has a 50% chance to skip any that are not horror marked+  * ??Manifestation#836?? checks at most 8 random commanders. It has a 50% chance to skip any that are not horror marked
  
   * <color #666666>There is a 20% chance that each side in an assassination gets to pull 1d4+ blood slaves into the fight</color>   * <color #666666>There is a 20% chance that each side in an assassination gets to pull 1d4+ blood slaves into the fight</color>
- 
-  * size/strength negate: 5+6 always immune, 4 is 66% to ignore, 3 is 33% to ignore, otherwise roll strength vs 14 + d20 (no DRN or openended). If strength wins (not ties) it is negated 
  
   * Looming Hell has a 5% chance per candle in the affected unit's province to not use one of its 5 "charges".   * Looming Hell has a 5% chance per candle in the affected unit's province to not use one of its 5 "charges".
- 
-  * Dementia is 25% to make units do nothing for 3650 ticks 
  
   * Picus/Procas axes give +2 MR, +5 strength and +10 fear if used together   * Picus/Procas axes give +2 MR, +5 strength and +10 fear if used together
 +    * ??Picus's Axe of Rulership?? and ??Procas's Axe of Rulership??
  
-  * Despite having the gender changing effect set at -1, the bear claw amulet does not function. Cat charm however does.+  * Despite having the gender changing effect set at -1, the ??Bear Claw Talisman?? does not function. ??Cat Charm?? howeverdoes.
  
   * The chance to spawn a guardian spirit in percent is (10 * holy level) + innate guardian spirit modifier + (1 * number of candles, negative if hostile).   * The chance to spawn a guardian spirit in percent is (10 * holy level) + innate guardian spirit modifier + (1 * number of candles, negative if hostile).
Line 50: Line 64:
   * Fatigue from flying is (flight distance * enc)/20, doubled in rain or snow (but only if you don't have storm immunity or storm power). Curse of stones is a flat 2d6 nonexploding every time you fly. Flight distance is simply dx + dy, capped to a maximum of 20 for this calculation.   * Fatigue from flying is (flight distance * enc)/20, doubled in rain or snow (but only if you don't have storm immunity or storm power). Curse of stones is a flat 2d6 nonexploding every time you fly. Flight distance is simply dx + dy, capped to a maximum of 20 for this calculation.
  
-  * Blood vortex: remembers where you cast it. Makes 3 remote checks, the first of which will always be an adjacent province to where it was cast. Further checks are provinces picked at random, that have nonzero population and are not UW. (Population here refers to /10 from the displayed game values)+  * ??Blood Vortex??: remembers where you cast it. Makes 3 remote checks, the first of which will always be an adjacent province to where it was cast. Further checks are provinces picked at random, that have nonzero population and are not UW. (Population here refers to /10 from the displayed game values)
     * Remote checks contribute (pop/20) + d50+, capped to the province's pop. This is halved if order 2 or 3, and doubled if turmoil 2 or 3. Affected provinces gain 1d10 nonexploding unrest and have their population reduced appropriately. Final population contribution to the vortex is half of what is drained.     * Remote checks contribute (pop/20) + d50+, capped to the province's pop. This is halved if order 2 or 3, and doubled if turmoil 2 or 3. Affected provinces gain 1d10 nonexploding unrest and have their population reduced appropriately. Final population contribution to the vortex is half of what is drained.
     * Local province: pop/10 + d100+, capped to pop. Population is drained, but scales have no impact.      * Local province: pop/10 + d100+, capped to pop. Population is drained, but scales have no impact. 
     * Final slave total = (local contribution + remote contribution + d10 nonexploding - 1)/9     * Final slave total = (local contribution + remote contribution + d10 nonexploding - 1)/9
  
-  * Fires from afar hit rate is 20% or (number of units in province*25)/number of effects, whichever is higher. The same unit cannot be hit more than once. +  * ??Fires from Afar?? hit rate is 20% or (number of units in province*25)/number of effects, whichever is higher. The same unit cannot be hit more than once.
- +
-  * Effect modifier 4611686018427387904 is 1/3 strength added+
  
   * <color #666666>Lingering effects technically do (x + 2)/3 rounded down damage</color>   * <color #666666>Lingering effects technically do (x + 2)/3 rounded down damage</color>
Line 71: Line 83:
   * AoE spread: get anything adjacent (including diagonal) to the last square hit. If you already hit the square, get another one adjacent to the square you just checked and try again. Upon finding an empty square, hit that, and then start again at the origin. Repeat until the desired number of squares are hit.   * AoE spread: get anything adjacent (including diagonal) to the last square hit. If you already hit the square, get another one adjacent to the square you just checked and try again. Upon finding an empty square, hit that, and then start again at the origin. Repeat until the desired number of squares are hit.
  
-  * GfH deviates at most 1 square in any direction, including diagonals. (This is due to spell attrib 579 and is done once for each point of the attrib) +  * ??Gifts from Heaven?? deviates at most 1 square in any direction, including diagonals. (This is due to spell attrib 579 and is done once for each point of the attrib)
- +
-  * Stupid is 10% chance to do nothing (and wait for half a round), 10% to attack something adjacent at random. +
- +
-  * Rage: 50% chance to attack a random adjacent square +
- +
-  * Confusion: 30% to stand and do nothing, 20% to attack a random adjacent square+
  
   * Blood slave usage range looks to be 8 squares along either axis so the total usage area is square and not circular   * Blood slave usage range looks to be 8 squares along either axis so the total usage area is square and not circular
  
-  * Transformation's yellow text is nearly right. The checks really are 20% + misfortune scale to fail. Succeeding the first gives a good result. Upon failing the first check there is then a second identical check, succeeding this gives you a bad result (and feebleminds you if the new form is not mindless). Failing both checks kills you.+  * ??Transformation??'s yellow text is nearly right. The checks really are 20% + misfortune scale to fail. Succeeding the first gives a good result. Upon failing the first check there is then a second identical check, succeeding this gives you a bad result (and feebleminds you if the new form is not mindless). Failing both checks kills you. 
 +  * A bad result that is mindless lowers your paths to F4A4W4E4S3D4N3B4 if any of them were higher than that 
 +  * Even when you fail both and die, you still get transformed into something, which feebleminds you or applies the path limiting above anyway. 
 +  * %%The chance of getting a pathboost in percent is (can't push you above X10) is ((10 - drain scale) * attuned percentage * 10)/100. Magic scales count for negative drain. Attuned values are a chassis attribute, for instance cave drakes have 50% earth attuned.%%
  
   * Spell interruption chance in percent is interruptdamage + 25 + (damage*100)/maxhp. Interruptdamage is from effect 129 only. Combat casters and mindless/slave vessels are halved, both conditions will half twice, rounding down after each.   * Spell interruption chance in percent is interruptdamage + 25 + (damage*100)/maxhp. Interruptdamage is from effect 129 only. Combat casters and mindless/slave vessels are halved, both conditions will half twice, rounding down after each.
Line 135: Line 144:
     * If the unit died, it adds one to the province's armed corpse count if it is not an animal, undead, need not eat, naturally ethereal, or inanimate     * If the unit died, it adds one to the province's armed corpse count if it is not an animal, undead, need not eat, naturally ethereal, or inanimate
     * If the unit was not undead and not inanimate, and haunted forest is active, and the battle is taking place in the relevant dominion, you get a manikin for someone (probably the enchantment owner)     * If the unit was not undead and not inanimate, and haunted forest is active, and the battle is taking place in the relevant dominion, you get a manikin for someone (probably the enchantment owner)
- 
-  * Spec 0x100000000000000 or 72057594037927936 readds magic damage  
- 
-  * 0x4000000000000000 or 4611686018427387904 adds 1/3 strength 
- 
-  * 0x800000000 or 34359738368 is added to all effects with aoe > 0 
- 
-  * 0x40000000 or 1073741824 is simply added to all spells 
- 
-  * 144115188075855872 makes projectiles stick to the ground rather than fly normally 
- 
-  * 0x400000000 or 17179869184 is weapon #range050 
- 
-  * 0x8000000000000 or 2251799813685248 may be for flaming projectiles 
- 
-  * 141837069189120 is not construct immune, it actually prevents the user hitting themselves (but doesn't work on x% field AoEs) 
  
   * Communion fatigue calc   * Communion fatigue calc
Line 182: Line 175:
   * Tartarians are 50% to feeblemind, 20% to be a commander. Then, 50% to add extra afflictions (equal odds of major and minor). Continue rolling 50%s until an affliction was not added.   * Tartarians are 50% to feeblemind, 20% to be a commander. Then, 50% to add extra afflictions (equal odds of major and minor). Continue rolling 50%s until an affliction was not added.
  
-  * Imprint souls:+  * ??Imprint Souls??:
     * Fails if targeted province has no population     * Fails if targeted province has no population
     * Final damage is (spell damage) or (province pop/10 * 5), whichever is less     * Final damage is (spell damage) or (province pop/10 * 5), whichever is less
Line 228: Line 221:
   * Poison fatigue damage on size 3+ is reduced to (dmg*2)/size [or 2/<size> of the original damage]   * Poison fatigue damage on size 3+ is reduced to (dmg*2)/size [or 2/<size> of the original damage]
  
-  * Life after death fails on Undead, immortals, demons, inanimate beings, creatures that are inherently ethereal, pretenders, most kinds of animals (unknown checks)+  * ??Life after Death?? fails on Undead, immortals, demons, inanimate beings, creatures that are inherently ethereal, pretenders, most kinds of animals (unknown checks)
     * Sea fathers turn into soulless#197     * Sea fathers turn into soulless#197
     * Cyclops#156 turn into tartarian cyclops (!)     * Cyclops#156 turn into tartarian cyclops (!)
Line 317: Line 310:
     * otherwise, 915     * otherwise, 915
  
-  * Crossbreeding:+  * ??Cross Breeding??:
     * You get (nreff + crossbreeding bonus) creatures.     * You get (nreff + crossbreeding bonus) creatures.
     * Quality is (Luck * 5) + 17 + crossbreeding bonus.     * Quality is (Luck * 5) + 17 + crossbreeding bonus.
Line 325: Line 318:
     * First roll for normal heroes, if that misses you roll for multihero; if a normal hero is blocked by minimum arrival turn the roll is ignored as if it never succeeded     * First roll for normal heroes, if that misses you roll for multihero; if a normal hero is blocked by minimum arrival turn the roll is ignored as if it never succeeded
  
-  * Strands of arcane power:+  * ??Strands of Arcane Power??:
     * First, the site searching.     * First, the site searching.
       * Check each province that you own and has friendly dominion.       * Check each province that you own and has friendly dominion.
Line 340: Line 333:
       * If the global caster got feebleminded, don't attack anyone else       * If the global caster got feebleminded, don't attack anyone else
  
-  * It looks like ravenous swarm will attack every 5120 ticks. It first aims for undead, then accept any target. Its damage is AN, ignores shields, nonmagical, and has no source for the sake of damage reversal.+  * It looks like ??The Ravenous Swarm?? will attack every 5120 ticks. It first aims for undead, then accept any target. Its damage is AN, ignores shields, nonmagical, and has no source for the sake of damage reversal.
  
   * Special AoE values:   * Special AoE values:
Line 366: Line 359:
  
   * Upkeep and desertion:   * Upkeep and desertion:
-    * Calc your upkeep for everything (units banished to other planes don't count). If your final gold total is negative and your upkeep was nonzero, it's desertion time.+    * Calc your upkeep for everything (units banished to other planes don't count). If your final gold total is negative and your upkeep was nonzero, it's desertion time. The "gold per year" displayed under the morale section on a unit card is actually (actual upkeep per turn*12 + 7)/15 rounded down
       * Calculate (negative gold total * -25) / (total upkeep). This is the desertion chance in %       * Calculate (negative gold total * -25) / (total upkeep). This is the desertion chance in %
       * If that was was 11+, set it to 10.       * If that was was 11+, set it to 10.
Line 466: Line 459:
       * If anyone was hurt due to already having disease, or someone started starving (and the above messages didn't trigger), "There is a lack of supplies in %s. Diseases are afflicting the troops."       * If anyone was hurt due to already having disease, or someone started starving (and the above messages didn't trigger), "There is a lack of supplies in %s. Diseases are afflicting the troops."
       * Otherwise, no message       * Otherwise, no message
- 
-  * Beckoning targeting: goes for the main province owner. If that is the same as the caster's nation, it will target the fort's owner instead in the case of sieged provinces 
  
   * Precision:   * Precision:
Line 481: Line 472:
   * Pebbleskin suit is 2% per turn to transform you, but not if you're inanimate   * Pebbleskin suit is 2% per turn to transform you, but not if you're inanimate
  
-  * Vengeful waters:+  * ??Vengeful Water??:
     * UW always gets 409 = size 5 water     * UW always gets 409 = size 5 water
     * Cold 2 gets 833 = size 4 ice     * Cold 2 gets 833 = size 4 ice
Line 490: Line 481:
     * Otherwise, 411 = size 3 water     * Otherwise, 411 = size 3 water
  
-  * Targeting for ffts/murdering winter:+  * Targeting for ??Flames from the Sky??/??Murdering Winter??:
     * Total up the number of nonsneaking commanders of all nations in the target province, except those that are on the same team as the caster     * Total up the number of nonsneaking commanders of all nations in the target province, except those that are on the same team as the caster
     * Each nation rolls (closed d100 + 49) * number of commanders, the highest value "wins" and eats ffts to the face     * Each nation rolls (closed d100 + 49) * number of commanders, the highest value "wins" and eats ffts to the face
Line 498: Line 489:
   * Turmoil summon is an exploding d%%((turmoil * 3) + 5)%% every turn   * Turmoil summon is an exploding d%%((turmoil * 3) + 5)%% every turn
  
-  * Enchanted forests: All forests under neutral or enemy dominion act as if they were temples of the caster's pretender. When the dominion has become friendly it stops spreading. Each forest under friendly dominion picks make up to three attempts to pick a random adjacent province, each with a %%((candles + 4) * growth * 5)% chance of succeeding. Upon success, the province is attacked if it is a hostile non-wasteland non-sea province%%.+  * ??Enchanted Forests??: All forests under neutral or enemy dominion act as if they were temples of the caster's pretender. When the dominion has become friendly it stops spreading. Each forest under friendly dominion picks make up to three attempts to pick a random adjacent province, each with a %%((candles + 4) * growth * 5)% chance of succeeding. Upon success, the province is attacked if it is a hostile non-wasteland non-sea province%%.
  
-  * Ghost ship armada:+  * ??Ghost Ship Armada??:
     * For each unlocked armada...     * For each unlocked armada...
       * Pick a random province.       * Pick a random province.
Line 538: Line 529:
   * Global enchantment dispelling/overcast is an exploding d20, not a d6 as stated by the manual   * Global enchantment dispelling/overcast is an exploding d20, not a d6 as stated by the manual
  
-  * Wild Hunt - all attackers belong to the casting nation and the casting nation sees all reports+  * ??Wild Hunt?? - all attackers belong to the casting nation and the casting nation sees all reports
     * Start with 10 attempts remaining     * Start with 10 attempts remaining
     * If attempts remaining & 1 == 0, look at province ID 1. Otherwise, look at a random province ID     * If attempts remaining & 1 == 0, look at province ID 1. Otherwise, look at a random province ID
Line 568: Line 559:
         * If these lesser attacks fail, nothing happens to the global enchantment.         * If these lesser attacks fail, nothing happens to the global enchantment.
  
-  * Illwinter attacks:+  * ??Illwinter?? attacks:
     * 2 spawn chances. Pick a random province, it fails if provinces is UW, not cold, or owned by the caster or his team. Equal chances for:     * 2 spawn chances. Pick a random province, it fails if provinces is UW, not cold, or owned by the caster or his team. Equal chances for:
       * Niefel Giant commander with closed d4 - 1 Niefel Giant troops       * Niefel Giant commander with closed d4 - 1 Niefel Giant troops
Line 575: Line 566:
       * Jotun Wolf commander with open ended 2d6 Dire Wolf troops       * Jotun Wolf commander with open ended 2d6 Dire Wolf troops
  
-  * Infernal breeding:+  * ??Infernal Breeding??:
     * Roll closed 2d6, add the game era [a range 1-3] and subtract 1. Going to call this the era value for now     * Roll closed 2d6, add the game era [a range 1-3] and subtract 1. Going to call this the era value for now
     * Roll open 1d4, subtract 2, add the number of effects, and half your adept crossbreeder value rounded down. This value can't be lower than 1. This turns out to be the number of units made     * Roll open 1d4, subtract 2, add the number of effects, and half your adept crossbreeder value rounded down. This value can't be lower than 1. This turns out to be the number of units made
Line 602: Line 593:
     * 114 treelord     * 114 treelord
  
-  * Vafur flames will only affect things that can be set on fire. Rain gives a 50% chance to avoid its effects. Creatures can only be affected by the damage component once per battle, but will be set on fire every time they enter the flames (if they can be set on fire).+  * ??Vafur Flames?? will only affect things that can be set on fire. Rain gives a 50% chance to avoid its effects. Creatures can only be affected by the damage component once per battle, but will be set on fire every time they enter the flames (if they can be set on fire).
  
-  * Hidden in Snow:+  * ??Hidden in Snow??:
     * Always 1 unfrozen lord     * Always 1 unfrozen lord
     * You get (8 - drain) + turmoil + closed d8 unfrozen warriors     * You get (8 - drain) + turmoil + closed d8 unfrozen warriors
Line 611: Line 602:
     * There is a second, independent (3*misfortune + 25)% chance to get a mage     * There is a second, independent (3*misfortune + 25)% chance to get a mage
  
-  * Hidden in Sand/Underneath:+  * ??Hidden in Sand??/??Hidden Underneath??:
     * Always 1 leader     * Always 1 leader
     * %%((8 - drain) - turmoil) + closed d8 good troops%%     * %%((8 - drain) - turmoil) + closed d8 good troops%%
Line 627: Line 618:
     * Forest     * Forest
  
-  * Ritual of rebirth:+  * ??Ritual of Rebirth??:
     * Get first valid hero in HoF that is dead and owned by the caster's nation. Can't be inanimate (unless it is one of the three mummy types this spell makes).     * Get first valid hero in HoF that is dead and owned by the caster's nation. Can't be inanimate (unless it is one of the three mummy types this spell makes).
     * Get resource size, if set. Otherwise, use "normal" size.     * Get resource size, if set. Otherwise, use "normal" size.
Line 635: Line 626:
     * Prophet status is removed if you made another prophet, but not H3.     * Prophet status is removed if you made another prophet, but not H3.
  
-  * Beckoning:+  * ??Beckoning??:
     * Final nreff = min(spell nreff, the number of units in the province belonging to the fort owner)     * Final nreff = min(spell nreff, the number of units in the province belonging to the fort owner)
     * Forest survival does provide immunity     * Forest survival does provide immunity
Line 641: Line 632:
     * If they fail that, they suffer the damage/spec of the spell as effect 2 (so for vanilla it's 999 damage, MRN, uses caster's pen bonus etc)     * If they fail that, they suffer the damage/spec of the spell as effect 2 (so for vanilla it's 999 damage, MRN, uses caster's pen bonus etc)
  
-  * Stygian Paths+  * ??Beckoning?? targeting: goes for the main province owner. If that is the same as the caster's nation, it will target the fort's owner instead in the case of sieged provinces 
 + 
 +  * ??Stygian Paths??
     * Stygian Guide value = the highest value of stygian guide of the commander and all troops under their leadership     * Stygian Guide value = the highest value of stygian guide of the commander and all troops under their leadership
     * All units take 1 AN magic damage     * All units take 1 AN magic damage
Line 647: Line 640:
     * If any given unit is stealthy, it has a (stealthy)% chance to avoid the MR or die effect, to a maximum of 90% evasion at 90+ stealth.     * If any given unit is stealthy, it has a (stealthy)% chance to avoid the MR or die effect, to a maximum of 90% evasion at 90+ stealth.
  
-  * Twiceborn shape logic+  * ??Twiceborn?? shape logic
     * Units with base twiceborn shapes defined use that     * Units with base twiceborn shapes defined use that
     * If you have a #firstshape, consider that instead of whatever shape you are in currently     * If you have a #firstshape, consider that instead of whatever shape you are in currently
Line 924: Line 917:
     * Commanders just get one swing on a d1000-1     * Commanders just get one swing on a d1000-1
  
-  * Magic duel baiting:+  * ??Magic Duel?? baiting:
     * Spellcasting AI scans squares in lines going down the length of the battlefield. It starts at the top left corner, goes all the way right, then moves down a line, and repeats.     * Spellcasting AI scans squares in lines going down the length of the battlefield. It starts at the top left corner, goes all the way right, then moves down a line, and repeats.
     * This is relevant because in the case of a TIED score, the first square checked is always retained, making magic duel somewhat biased towards things on rows closer to the top of the battlefield (and to a lesser extent, things on the left of these rows).     * This is relevant because in the case of a TIED score, the first square checked is always retained, making magic duel somewhat biased towards things on rows closer to the top of the battlefield (and to a lesser extent, things on the left of these rows).
Line 1089: Line 1082:
   * Pretenders at game creation are given consecutive unit IDs. These go in ascending order of nation IDs in the game. They are not the first things to be created though, so for the purposes of innate spellcasting offsets, a clean multiple of 188 might happen to fall in the middle of this process. It still very very heavily biases two innate pretenders' offsets towards the lower nation ID though...   * Pretenders at game creation are given consecutive unit IDs. These go in ascending order of nation IDs in the game. They are not the first things to be created though, so for the purposes of innate spellcasting offsets, a clean multiple of 188 might happen to fall in the middle of this process. It still very very heavily biases two innate pretenders' offsets towards the lower nation ID though...
  
-FIXME Things that are checked every round+Undocumented hotkeys 
 + 
 +  * Many many not-really useful things, like "h" on the "pick a nation to play" will host if not multiplayer, tohfx will sort the in battle f1 display like clicking on the columns does, many alternative ways to close windows... 
 +  * $ with -d or higher on the strategic map desplays your "kingdom value". Don't really know what this is useful for 
 +  * C on the "Rejoice! X has ascended -> view scores/history" screen will host a new turn! 
 +  * F9 on strategic map displays thrones 
 +  * T on player setup tries to force teams of 4, with nations assigned by internal ID 
 +  * d on send messages retracts all messages 
 +  * i on the army setup screen will invert the selection of units in the selected squad 
 +  * ctrl-p on army setup writes something to the blind log 
 +  * r, s, m, l on the map selection screen for a new game do something. I'm not certain what, might be selecting random map sizes 
 + 
 +Armor defeating ("critical" hits) 
 + 
 +  * Looks a bit different to the dom4 stuff. 
 +  * Applies only if: 
 +    * Trying to do more than -900 damage (this likely has some internal significance) 
 +    * The attack is not AN 
 +    * One of the following: 
 +      * Final prot DRN is 0-2 inclusive 
 +      * Final prot DRN is 0-3 inclusive AND the victim's fatigue is 50+ 
 +      * Final prot DRN is 0-4 inclusive AND the victim is immobilised, but is not inherently an immobile unit type 
 +    * The result is the victim's protection is reduced by (victim's protection+2)/4, rounded down 
 + 
 +Graphs. I am not too confident on these... 
 + 
 +  * Army size graph looks to plot (total size of all units you own)/4 to a max of 65000. This counts base unit type size, so enlarge/shrinking units has no effect. 
 +  * Dominion graph looks to plot (total of all candles, +10 for each province that has your candles)/2 to a max of 65000. 
 + 
 +Melee weapons and items: 
 +  * the first weapon is skipped if you have 2+ shields from items and the weapon is nonintrinsic 
 +  * the second weapon is skipped if you have any shields from items and the weapon is nonintrinsic 
 +  * the third weapon is skipped if you have 3+ shields from items and the weapon is nonintrinsic 
 +  * the fourth weapon is skipped if you have 4+ shields from items the weapon is nonintrinsic 
 +  * This looks backwards, but if you swapped 1st and 2nd consider that any human with a sword and shield would lose their shield if given a magic shield, it's weird but is what it is 
 +  * Weapon attribute 657 seems to be "needs accessible horns to use" and weapons with this are removed if a crown is equipped 
 + 
 +It looks like moving off the field simulates 100 rounds of affliction and regen processing, this specifically includes poison, decay, That Mystery Affliction that Does More To Undead, uwdamage, landdamage, burning, bleeding, freezing, desiccation, plague, regen 
 + 
 +Assassinations: 
 +  * This function processes all commanders in ascending commander ID order. 
 +  * Infiltration for graphs: is just 50% to succeed 
 +  * Cause unrest: creates openended d20 unrest 
 +  * Seduction: two map commander orders (72, seduction; 58: corruptor) do this. 
 +    * Get a commander to target. This looks properly randomised (builds a list on the stack and then picks one randomly). This respects Scale Walls. Sneaking commanders are not valid targets, as many players probably know from experience. 
 +    * If dream seduction, penbase = 13 + (pen bonus from items, bless etc), moralebase = <value of dream seduction> 
 +    * If nondream seduction (overwrites dream if you give a unit both), penbase = 99, moralebase = <value of seduction ability> 
 +    * If the unit is female (including via cat charm): 
 +      * Add the amount of the gender changing effect to the morale base 
 +    * If action is corrupt: penbase=99, moralebase=<value of corruptor ability>, which will overwrite anything earlier 
 +    * Make 1000 attempts to pick an adjacent province you can retreat to. I could look into this in more detail if required. 
 +    * If no province found, you get "With nowhere to run with the victim afterwards, %s aborted the seduction attempt." 
 +    * The MR check is always rolled, even for corruption and non-dream seduction (though with a base pen of 99 they probably can't really ever fail). Specifically, if MR + DRN >= penbase + DRN then it fails (result=0, result2=0) and you get "%s tried to project %s wonderful dreams at %s, but the target resisted and no real seduction could be done." 
 +    * If you have nowhere to walk to, but can fly and your size is less than your target's, you fail (result=-3, result2=0). 
 +    * If the seducer and victim are the same gender, you head towards a fail state that presumably corruption will undo later (result=-1, result2=1) 
 +    * If the victim is something that can't be converted (ie is a god or prophet), result1=-1, result2=0 
 +    * If the victim is immobile result=-3, result2=0 
 +    * Otherwise you pass (result=1, result2=0) 
 +    * Roll the morale check: if moralebase + DRN > victim's morale + DRN, you keep the result1 from above. 
 +      * Otherwise, result1 becomes -1 if any of the following are true: this is corruption (not seduction), or the seducer's morale roll < (the victim's morale roll - 2), or result2 != 0. If none of that was true result1 becomes -2 instead 
 +    * If result1 == 1: The seduction succeeded: "%s disappeared one night and was never seen again." etc. 
 +    * If result1 == 0: The (dream) seduction failed. "%s tried to project %s wonderful dreams at %s, but the target resisted and no real seduction could be done." The victim's nation does NOT get a message for this one. 
 +    * If result1 == -2: "%s tried to seduce %s, but %s could not shy away from %s duties. However %s did not want %s to get caught and did not give %s away.". But nothing else happens, and the victim's nation doesn't get told anything. 
 +    * If result1 == -3: You failed due to "logistical reasons" and fight anyway. 
 +    * If result1 is anything else, and result2==0, and the victim has less than 20 morale: "%s failed to %s %s and a battle ensued." 
 +    * Any other case: "%s failed to %s %s and a battle ensued. In fact %s wasn't even remotely interested in the offer." 
 +  * Order 61 (I think this is "Lure", the Siren/Jorogomu ability) 
 +    * Pick a commander to assassinate. 
 +    * This also requires mixed genders. 
 +    * MR: attempt fails if 16 + DRN < victim MR + DRN 
 +    * Morale: attempt fails if <lure ability value> + DRN < victim morale + DRN 
 +    * Also fails if victim is prophet or god 
 +    * If you succeeded this far: 
 +      * If this attempt is using Jorogumo's 0x2a7 ability... 
 +        * If victim's strength + DRN <= 15 + DRN, you end up fighting later. 
 +      * If the victim does not die when taken underwater, you end up fighting later. 
 +    * All fights take place underwater (add terrain mask 4) but seemingly without setting the assassination flag and the 50% chance of darkness. **This looks like it includes the Jorogumo fight if you pass the strength check, which is probably a bug** 
 +    * Much like seduction, there's a range of messages: 
 +      * MR/Morale checks passed: 
 +        * Jorogumo type: 
 +          * "%s encountered an alluring woman that tried to seduce %s. But %s did not leave %s post." - Victim gets this 
 +          * "%s failed to lure %s into her trap." - user gets this if victim has <20 morale 
 +          * "%s failed to lure an enemy called %s into her trap. In fact %s wasn't attracted at all to this most beautiful song." - victim has 20+ morale 
 +        * Normal type: 
 +          * "%s managed to resist a magically alluring song that was heard from the water." 
 +          * "%s failed to lure %s into the sea." 
 +      * Complete Success: 
 +        * Jorogumo type: 
 +          * "%s successfully lured %s into the her webs and dragged him into the water where he drowned." - User 
 +          * The victim can get two messages, with a coin flip between them: "%s disappeared one night and was never seen again. This night some people say they saw a glimpse of an extraordinarily beautiful woman." and your normal boring "%s disappeared one night and was never seen again." 
 +        * Normal lure: 
 +          * "%s successfully lured %s into the sea where he drowned." - User 
 +          * Victim can have two messages: 
 +            * 75%: "%s disappeared one night and was never seen again. This night some people heard the most beautiful song." 
 +            * 25%: "%s disappeared one night and was never seen again." 
 +      * Other failures: 
 +        * Jorogumo type: 
 +          * "%s disappeared one night when he followed an enticing young woman. He suddenly found himself trapped in spider webs, but no web is strong enough to hold %s for long. After breaking free he attacked the woman that lured him into this trap." - Victim, passed strength check 
 +          * "%s successfully lured an enemy commander called %s into her web. Unfortunately he broke free from the web and a battle ensued." - User, passed strength check 
 +          * "%s successfully lured an enemy commander called %s into her web. All seemed well as she dragged the helpless victim into the nearby pool of water. Unfortunately the victim later emerged unharmed from the water and attacked her." - User, victim does not die underwater 
 +          * "%s disappeared one night when he followed an enticing young woman. He suddenly found himself trapped in spider webs and dragged into a pool of water. Unable to drown, %s could free himself as the web started to dissolve. After breaking free he emerged from the water and attacked the woman that lured him into this trap." - Victim, if does not die underwater 
 +        * Regular lure: 
 +          * "%s successfully lured an enemy commander called %s into the sea. Unfortunately he didn't drown and a battle ensued." - User, victim does not die underwater 
 +          * "%s disappeared one night and entered the sea. This night some people heard the most beautiful song. %s was disappointed to find a fish being instead of the beautiful female he had envisioned. He attacked her in rage and disappointment." - Victim, when not dying underwater 
 +  * Regular assassination: does what it says. I can't see any surprises here. 
 +  * Seduction/regular assassinations are 50% to add what I assume is the the nighttime darkness terrain flag. 
 +  * Looks like Jorogumo's lure can be used anywhere that isn't a waste. 
 + 
 +  * A side's "max" hp calc (this is only for adjusting the saved value of "how much hp did my side start with", the actual work just does the hp calcs with modifications as below for slaves/pd) goes like this: 
 + 
 +      Get real total 
 +      Get tempflag1 total - I added a note saying retinue gets this flag, but pd does NOT (it's tempflag3) 
 +      "Permanent" total = real - tempflag1 
 +      if "permanent" total <= tempflag1 total, templflag1 total = "permanent" total 
 +      Actual total of the calc = permanent + tempflag1 total 
 +   * This is really confusing, but it's maybe the basis of the one commander and their retinue line? 
 +     * 1x 10hp guy, 100hp of retinue 
 +       * real=110 
 +       * tempflag1 = 100 
 +       * permanent = 10 
 +       * The conditionis true, so tempflag1=10 
 +       * actual total = 20 
 +   * pd (temp flag=3) contribute hp/4 rounded up 
 +   * slaves contribute hp/2 rounded up 
 + 
 +Blastsquare (and the apostasy bug) 
 +  * A = size points in square + open 2d6 
 +  * A gets 999 added if battle enchant/timestop or the spell has ignore shields spec value 
 +  * If spell doesn't have the nonmagical spec, add 2 more to A 
 +  * %%B = (2 - victim fatigue/20 rounded down) + open 2d6%% 
 +  * Get your shield defence/parry value, and double it. 
 +  * If spec has either "flail spec" 4 or AN 128, shield defence/parry value = 0. 
 +  * Calc effective shield protfetch the value, if spec has AP, halve it, if spell is AN or ignores shields then this is zero. 
 +  * If spec has neither flail spec 4 or AN 128, and the victim is standing on a fort wall 
 +    * If shield defence/parry was less than 10, set it to 10. 
 +    * If shield prot was less than 30, set it to 30. Then, if the effect was AP, half it. (this seemingly introduces an order of operations bug - if you have a prot 36 shield vs AP, you'll use the wall bonus instead despite it being worse) 
 +  * If you have air shield, there's a value% chance to add 100 to B. 
 +  * If A < B, the victim avoids all damage. 
 +  * If A < (B + the shield's parry value), you hit the shield.
  
 FIXME look at what sets the assassination flag, very likely there is a bug in the spells that don't use it (which will cause casting AI to not have the reduced buff preference) FIXME look at what sets the assassination flag, very likely there is a bug in the spells that don't use it (which will cause casting AI to not have the reduced buff preference)
user/loggy/misc.1672679302.txt.gz · Last modified: 2023/01/02 17:08 by jonarbuckle