Damage type bugs

Discussion in 'Civ4 - Fall from Heaven' started by Ahriman, Jul 14, 2008.

  1. Ahriman

    Ahriman Tyrant

    Joined:
    Jun 8, 2008
    Messages:
    13,266
    Location:
    Washington, DC
    I have a feeling that there are some bugs with damage resistance/immunity.

    In playing a Fall Further game with the Scions of Patria, I had strength 14 Wraiths with my 5 death mana, so they were 6+8death strength. Similarly for my Spectres.
    Displayed combat values were very low when fighting against undead or demon units that in theory were immune to death damage, as they should be. But the rate at which I was consistently winning fights with displayed combat odds of 0.3% and 0.5% makes me think that the death damage immunity was not actually being processed in the actual combat calculations.

    Similarly, I remember a while ago situations where I had open borders with country A and was at war with country B, and country B had open borders with country. Displayed combat odds gave Country B units in country A cities the defensive bonus from cities and fortifications, but the number of battles I won with frontal assaults of summoned units made me pretty sure that the defensive bonuses weren't actually being calculated.

    I don't know whether other damage bonuses or resistances actually help. IMO resistances should also reduce the max damage of spells; Maelstrom that normally damages a unit to 50% should only be able to damage a unit with 20% lightning resistance to 30%.

    Would be good if someone could test/confirm these results.
     
  2. Pyr0mancer

    Pyr0mancer Prince

    Joined:
    Jan 18, 2008
    Messages:
    542
    Damage types from combat are indeed bugged in that resistances don't work properly. A glance at the Combat Log makes this quite clear.

    However, I believe magic-inflicted damage does properly take resistance into account. Case in point, my Combat V Cultist Druid was doing 75% damage pretty much every single Tsunami cast against Ljosalfar units, up to and including Combat II Beastmasters and Combat III Knights. The Elven promotion has -25% resistance to Cold damage, if I recall correctly. Ships in the same city were only taking 40-50% damage per cast.
     
  3. Vehem

    Vehem Modmod Monkey

    Joined:
    Nov 22, 2005
    Messages:
    3,219
    Just to confirm this one.

    Stack of Djinni with 15 Death Nodes (Strength 16, 15 of which is Death damage).
    Attacking a stack of skeletons at Strength 3+1.

    The effective strengths should be either
    Djinn: 1 vs Skeleton: 4 ( <0.1% chance of Djinn victory)

    or if the damage immunity (granted by Undead) is bugged,
    Djinn: 16 vs Skeleton:4 (>99.9% chance of Djinn victory).

    The Djinni won every combat out of 15 trials. The Debug values in the mouse over also suggest that the Djinn's strength is high.
     

    Attached Files:

  4. Vehem

    Vehem Modmod Monkey

    Joined:
    Nov 22, 2005
    Messages:
    3,219
    Another trial with Warriors vs Wraiths. The Warriors were granted 50 Death damage in their UnitInfo (natural, not affinity related).

    The Wraiths being undead should ignore that combat strength and treat the warrior as still being strength 3, whilst they themselves are strength 9.

    < 0.1% for a warrior victory is reported (correctly).

    The warriors won every trial out of 20.

    ===

    I had initially thought that it may just be Affinity related damage that isn't being typed, but this suggests that natural typed-damage is also ignoring immunity.
     
  5. Ahriman

    Ahriman Tyrant

    Joined:
    Jun 8, 2008
    Messages:
    13,266
    Location:
    Washington, DC
    Its also interesting to think about what this does to stack-defence priority.

    When my wraiths attack the stack, the initial defender seems to be the one with the highest actual chance, even though the Champion underneath would have higher reported combat odds of winning.
    So somehow the engine knows that the reported combat stats aren't the real ones.
     
  6. Kael

    Kael Deity

    Joined:
    May 6, 2002
    Messages:
    17,401
    Location:
    Ohio
    To test this I loaded up 5 fireballs (complete fire damage) and 5 barbarian goblins with immunity to fire. The odds correctly displayed that the fireballs had no chance (< 0.01%) against the goblins, but they won every combat.

    So exactly as you guys noticed, there is a bug. Into the SDK I go.

    edit: okay, I think I found it. I will be fixed in 0.33.
     
  7. MagisterCultuum

    MagisterCultuum Great Sage

    Joined:
    Feb 14, 2007
    Messages:
    16,396
    Location:
    Kael's head
    Care to post the code that needs to be changed to fix it?

    I'd rather not have this bug in my modmod, but I doubt that I'll be moving to 0.33 particularly soon.That is in part because you recommend modmods stick with stable versions, and mostly because I'd have to wait for Vehem to update the Fall Further SDK. I'm thinking you should post the code now so that it will be fixed in Fall Further's next big release (which will include significant SDK changes like UnitStats and Xienwolf's XML modcomp)
     
  8. smjjames

    smjjames Emperor

    Joined:
    Nov 12, 2005
    Messages:
    1,345
    You probably should check it for spectres against golems (of any type, although it was wood golems when I experienced this bug) because I had something very similar to what the OP had. The savegame from when I reported this bug is somewhere in the bug thread.

    This probably should nerf slightly the Lucichurip balance wise because while they are already powerful and there is not much that can stand up to a constant (read 10+ in a turn) heavy barrage of fireballs (Iron Golem howitzers FTW! lol), the immunity fix should insert at least a way of countering this.
     
  9. rocklikeafool

    rocklikeafool Warmaster

    Joined:
    Jan 9, 2008
    Messages:
    2,416
    Location:
    Wherever there's Tequila...
    Hmm...I've noticed this with Rangers every once in while.
     
  10. xienwolf

    xienwolf Deity

    Joined:
    Oct 4, 2007
    Messages:
    10,589
    Location:
    Location! Location!
    I think I know where you are seeing the problem, though I am busy with seZ's new HUD so can't spend the time on testing it myself. If I am right then it'll clear up both sides of the issue, but if I am wrong it might not clear up the Weakness to certain damage types as well. So if you are elsewhere in the code, don't forget about that morsel :)
     

Share This Page