Page 1 of 1

[fixed]Unnatural Endurance makes you lose 2 life.

PostPosted: 22 Jan 2017, 15:03
by Aswan jaguar
Describe the Bug:
Unnatural Endurance makes you lose 2 life.

Which card did behave improperly?
Unnatural Endurance

Which update are you using? (date, name)Which type? (duel, gauntlet, sealed deck)
Manalink 2016/08/27: Eldritch Moon v2, duel

What exactly should be the correct behavior/interaction?
Unnatural Endurance.

Are any other cards possibly affected by this bug?
-

Re: [confirmed]Unnatural Endurance makes you lose 2 life.

PostPosted: 12 Feb 2019, 18:44
by Aswan jaguar
It's own code in commit d373665 so it doesn't work like Boon of Erebos. Not finished yet though.

Re: [confirmed]Unnatural Endurance makes you lose 2 life.

PostPosted: 18 Jul 2019, 21:12
by Korath
More cleanly expressed as simply
Code: Select all
return vanilla_instant_pump(player, card, event, ANYBODY, player, 2,0, VANILLA_PUMP_REGENERATE,0);
Boon of Erebos has to jump through extra hoops with VANILLA_PUMP_REGENERATE_DONT_KILL_CARD so that the caster loses life before the card is put into his graveyard. But what you have currently works too, it's just verbose and redundant.

What this still needs:
  • Different texts for the pump and regenerate shield effects; this is enforced by the VANILLA_PUMP_REGENERATE/VANILLA_PUMP_REGENERATE_DONT_KILL_CARD cases in vanilla_pump() (which vanilla_instant_pump() calls). Boon of Erebos's texts are in the right place.
  • A function address for ct_all.csv. This needs to be in src/ManalinkEh.asm in two places: an extern declaration for _card_unnatural_endurance at the end of the first half, and a jmp instruction for it at the end of the second. Each address is five higher than the previous, expressed in hexadecimal; so the next after _card_ash_barrens is 0x200f69c + 5 == 200f6a1. Alternately, you can just add it without the address (everything after a semicolon is just a comment), compile ManalinkEh.dll, then disassemble it:
    objdump output | Open
    Code: Select all
    ~/src/manalink/master/src$ objdump -d ManalinkEh.dll | less

    ManalinkEh.dll:     file format pei-i386


    Disassembly of section .text:

    02001000 <_DllEntry>:
     2001000:       b8 01 00 00 00          mov    $0x1,%eax
     2001005:       c3                      ret

    02001006 <_CodeSectionEx>:
     2001006:       e9 c5 e0 29 00          jmp    229f0d0 <_card_ainok_artillerist>
     200100b:       e9 30 e1 29 00          jmp    229f140 <_card_ainok_survivalist>
     2001010:       e9 3b e2 29 00          jmp    229f250 <_card_assault_formation>
     2001015:       e9 86 e6 29 00          jmp    229f6a0 <_card_avatar_of_the_resolute>
     200101a:       e9 a1 ea 29 00          jmp    229fac0 <_card_den_protector>
     200101f:       e9 bc ec 29 00          jmp    229fce0 <_card_dromokas_gift>
     2001024:       e9 17 ed 29 00          jmp    229fd40 <_card_epic_confrontation>
     2001029:       e9 32 f0 29 00          jmp    22a0060 <_card_foe_razer_regent>
     200102e:       e9 4d f2 29 00          jmp    22a0280 <_card_guardian_shield_bearer>
     2001033:       e9 08 fa 3a 00          jmp    23b0a40 <_card_azorius_signet>
     2001038:       e9 f3 b0 3b 00          jmp    23bc130 <_card_rakdos_signet>
     200103d:       e9 7e d6 3b 00          jmp    23be6c0 <_card_simic_signet>
     2001042:       e9 c9 78 3b 00          jmp    23b8910 <_card_gruul_signet>
     2001047:       e9 a4 a5 3b 00          jmp    23bb5f0 <_card_orzhov_signet>
     200104c:       e9 df 09 3b 00          jmp    23b1a30 <_card_boros_signet>
    [skip]
     200f68d:       e9 4e 50 2c 00          jmp    22d46e0 <_card_conquerors_flail>
     200f692:       e9 89 51 2c 00          jmp    22d4820 <_card_crystalline_crawler>
     200f697:       e9 54 55 2c 00          jmp    22d4bf0 <_card_prismatic_geoscope>
     200f69c:       e9 2f 56 2c 00          jmp    22d4cd0 <_card_ash_barrens>
     200f6a1:       eb 0d                   jmp    200f6b0 <_CodeSectionEx+0xe6aa>
     200f6a3:       90                      nop
     200f6a4:       90                      nop

Re: [confirmed]Unnatural Endurance makes you lose 2 life.

PostPosted: 20 Jul 2019, 10:31
by Aswan jaguar
Removed unnecessary code, applied new code address and prompt texts in 35d0cd1.