[(BGEE, BG2) Bug] Armor of faith bugs (0813)
Armor of Faith currently provides no damage reduction for elemental attacks (acid, cold, fire, electricity) and provides double protection against missiles. Per its description, it should be protecting against all damage equally:
// armor of faith not covering acid, cold, fire, electricity, doubles against missiles
COPY_EXISTING ~sppr111.spl~ ~override~
READ_SHORT 0x68 "abil_num"
LAUNCH_PATCH_FUNCTION ~DELETE_SPELL_EFFECT~ INT_VAR
opcode_to_delete = "89" // missile resistance effect
END
FOR (index = 1 ; index < abil_num ; index = index + 1) BEGIN
PATCH_IF (index < 5) BEGIN SET "resist" = 5 END ELSE
PATCH_IF ((index < 10) AND (index > 4)) BEGIN SET "resist" = 10 END ELSE
PATCH_IF ((index < 15) AND (index > 9)) BEGIN SET "resist" = 15 END ELSE
PATCH_IF ((index < 20) AND (index > 14)) BEGIN SET "resist" = 20 END ELSE
BEGIN SET "resist" = 25 END
FOR (index2 = 27 ; index2 < 32 ; index2 = index2 + 1) BEGIN
PATCH_IF (index2 = 31) BEGIN
SET index2 = 89
END
LAUNCH_PATCH_FUNCTION ~ADD_SPELL_EFFECT~ INT_VAR
opcode = "%index2%" // protection from spell
target = "1" // target self
power = "5" // power
resist_dispel = "3" // dispel/bypass MR
duration = (24 + (6 * "%index%")) // duration
parameter1 = "%resist%" // resistance to damaga
header = "%index%" + 1 // restricts to current ability header
END
END
END
BUT_ONLY_IF_IT_CHANGES
Post edited by Bhryaen on
1
Comments
Too big for me to move. An ability not doing what its supposed to be doing seems like an A to me.
Edit: @Tanthalas It's a B but I'll let it slide.
Ok, if you see I put something in the wrong place, please move it.
@CamDawg
You can move your discussions right? A lot of times I don't fully understand the fixes to judge what's best.
first header has 11 effects, instead of 16
also the normal elemental+projectile resistances 'lag behind' the magic ice/cold and weapon resistances.
Casted Armor of Faith in the game. If these are all existing types of damage:
Fire
Cold
Electricity
Acid
Magic Fire
Magic Cold
Slashing
Crushing
Piercing
Missile
Magic Damage
Then Confirmed Fixed in Build 0815.