Skip to content

[(BGEE, BG2) Bug] Armor of faith bugs (0813)

CamDawgCamDawg Member, Developer Posts: 3,438
edited August 2012 in Fixed
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

Comments

  • TanthalasTanthalas Member Posts: 6,738
    @Bhryaen

    Too big for me to move. An ability not doing what its supposed to be doing seems like an A to me.
  • CorianderCoriander Member Posts: 1,667
    edited July 2012
    I'll do it.

    Edit: @Tanthalas It's a B but I'll let it slide.
  • CamDawgCamDawg Member, Developer Posts: 3,438
    @Tanthalas Nothing I've posted so far merits an A; most of it's C-D. I may find some A when I finally get around to, you know, playing the beta. :)
  • TanthalasTanthalas Member Posts: 6,738
    @Coriander
    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.
  • CamDawgCamDawg Member, Developer Posts: 3,438
    Ah, so I can! I never noticed that in the editing function. Thanks, I'll try and shuffle some stuff around to help y'all out.
  • NathanNathan Member Posts: 1,007
    Verified internally, this change has been integrated. It should be present in the next private beta build.
  • Avenger_teambgAvenger_teambg Member, Developer Posts: 5,862
    edited August 2012
    Confirmed not fixed :(
    first header has 11 effects, instead of 16
    also the normal elemental+projectile resistances 'lag behind' the magic ice/cold and weapon resistances.
  • CamDawgCamDawg Member, Developer Posts: 3,438
    The first FOR loop should be starting at zero, not one.
    // 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 = 0 ; 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
  • SethDavisSethDavis Member Posts: 1,812
    Potentially fixed - @CamDawg's retconn has been applied
  • Avenger_teambgAvenger_teambg Member, Developer Posts: 5,862
    Confirmed fixed - checked in editor
  • TanthalasTanthalas Member Posts: 6,738
    @Avenger_teambg

    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.
Sign In or Register to comment.