Myth Posted September 8, 2015 Report Share Posted September 8, 2015 (edited) This behavior was mentioned in a few previous reports. To follow this issue, we have the following rigged fight: Attacker: Mythrandir Slot 1: Dark Archer (840124) --- attack: 50 (base) + 25 (Imp. bonus) = 75 Slot 2: Imperial Aramor Assassin (830050) --- attack: 130 (base) + 65 (Imp. bonus) = 195 Slot 3: Dark Archer (840125) --- attack: 50 (base) + 25 (Imp. bonus) = 75 Slot 4: Grasan Huvourer (835144) --- attack: 100 (base) + 50 (Imp. bonus) = 150 Slot 6: Unholy Priest II (836171) --- power: 80 (base) Defender: *Miq* Slot 2: Remains (841570) [shop version] --- power: 40 (base); defense: 10 (base) We'll be following 2 abilities: Weaken Defense and Martirism. Creatures to follow: Dark Archer (840124), Grasan Huvourer (835144), Unholy Priest II (836171) and Remains (841570). This color marks relevant combat lines. (most of it) This color marks comments related to correct behavior. This color marks comments related to incorrect behavior. [log='Combat Log']Loading Mythrandir creatures Loading *Miq* creatures Applying 0% of Mythrandir's energetic influence Applying 0% of *Miq*'s energetic influence Influences for Mythrandir ###### Imperial Aramor Assassin (830050): morale, attackbonus, attackbonus Unholy Priest II (836171): vampiricaura Influences for *Miq* ###### Remains (841570): regenaura Applying Mythrandir's Creature Tokens at 100% Imperial Aramor Assassin (830050)'s creature tokens [] Grasan Huvourer (835144)'s creature tokens [] Unholy Priest II (836171)'s creature tokens [] Dark Archer (840124)'s creature tokens [] Dark Archer (840125)'s creature tokens [] Applying *Miq*'s Creature Tokens at 100% Remains (841570)'s creature tokens [] Mythrandir’s Imperial Aramor Assassin (830050) does damage to weak creature(s) of *Miq* and:- Remains (841570) receives 185 damage and remains with 1815 vitality correct; Aramor attack: 195 - Remains (current) defense: 10 = damage: 185 Remains (841570) now has 1815 VE and 10 defense Mythrandir's Dark Archer (840124) does weaken to weak creature(s) of *Miq* and:- Weaken defence effect: -75 - maintains weaken on Remains (841570) weaken (round:2 weaken: defence=-75|from 10 to -65; ) Remains (841570) now has 1815 VE and -65 defenseand remains with 1815 vitality Mythrandir's Unholy Priest II (836171) does protect to dying creature(s) of *Miq* and:- Protection effect: 80 - Remains (841570) is protected by Unholy Priest II (836171) with defence, maintaining protection protect (round:3 protect: defence=80|from -65 to 15; ) Remains (841570) now has 1815 VE and 15 defense and remains with 1815 vitality Mythrandir's Dark Archer (840125) does weaken to weak creature(s) of *Miq* and:- Weaken defence effect: -75 - maintains weaken on Remains (841570) weaken (round:2 weaken: defence=-75|from 15 to -60; ) Remains (841570) now has 1815 VE and -60 defense and remains with 1815 vitality *Miq*'s Remains (841570) does protect to dying creature(s) of *Miq* and:- Protection effect: 40 - Remains (841570) is protected by Remains (841570) with defence, maintaining protection protect (round:3 protect: defence=40|from -60 to -20; ) Remains (841570) now has 1775 VE and -20 defense and remains with 1775 vitality Mythrandir's Grasan Huvourer (835144) does weaken to all creature(s) of *Miq* and:- Weaken defence effect: -150 - maintains weaken on Remains (841570) weaken (round:2 weaken: defence=-150|from -20 to -170; ) Remains (841570) now has 1775 VE and -170 defense and remains with 1775 vitality ###### START ROUND "1” ###### Applying temporary effects for *Miq*, slot 2 : weaken (round:1 weaken: defence=-75|from 10 to -65; ) weaken (round:0 weaken: effect ended) protect (round:2 protect: defence=80|from -65 to 15; ) weaken (round:1 weaken: defence=-75|from 15 to -60; ) weaken (round:0 weaken: effect ended) protect (round:2 protect: defence=40|from -60 to -20; ) weaken (round:1 weaken: defence=-150|from -20 to -170; ) weaken (round:0 weaken: effect ended) Mythrandir’s Imperial Aramor Assassin (830050) does damage to weak creature(s) of *Miq* and:- Remains (841570) receives 365 damage correct; Aramor attack: 195 - Remains (current) defense: -170 = damage: 365Remains (841570) now has 1410 VE and -170 defense and remains with 1410 vitality Mythrandir's Dark Archer (840124) does weaken to weak creature(s) of *Miq* and:- Weaken defence effect: -75 - maintains weaken on Remains (841570) weaken (round:3 weaken: defence=-75|from -170 to -245; ) Remains (841570) now has 1410 VE and -245 defense and remains with 1410 vitality Mythrandir's Unholy Priest II (836171) does protect to dying creature(s) of *Miq* and:- Protection effect: 80 - Remains (841570) is protected by Unholy Priest II (836171) with defence, maintaining protection protect (round:3 protect: defence=80|from -245 to -165; ) Remains (841570) now has 1410 VE and -165 defense and remains with 1410 vitality Mythrandir's Dark Archer (840125) does weaken to weak creature(s) of *Miq* and:- Weaken defence effect: -75 - maintains weaken on Remains (841570) weaken (round:3 weaken: defence=-75|from -165 to -240; ) Remains (841570) now has 1410 VE and -240 defense and remains with 1410 vitality *Miq*'s Remains (841570) does protect to dying creature(s) of *Miq* and:- Protection effect: 40 - Remains (841570) is protected by Remains (841570) with defence, maintaining protection protect (round:3 protect: defence=40|from -240 to -200; ) Remains (841570) now has 1370 VE and -200 defense and remains with 1370 vitality Mythrandir's Grasan Huvourer (835144) does weaken to all creature(s) of *Miq* and:- Weaken defence effect: -150 - maintains weaken on Remains (841570) weaken (round:3 weaken: defence=-150|from -200 to -350; ) Remains (841570) now has 1370 VE and -350 defense and remains with 1370 vitality ###### START ROUND "2” ###### Applying temporary effects for *Miq*, slot 2 : weaken (round:2 weaken: defence=-75|from -170 to -245; ) protect (round:3 protect: defence=80|from -245 to -165; ) weaken (round:2 weaken: defence=-75|from -165 to -240; ) protect (round:3 protect: defence=40|from -240 to -200; ) weaken (round:2 weaken: defence=-150|from -200 to -350; ) Mythrandir’s Imperial Aramor Assassin (830050) does damage to weak creature(s) of *Miq* and:- Remains (841570) receives 545 damage correct; Aramor attack: 195 - Remains (current) defense: -350 = damage: 545Remains (841570) now has 825 VE and -350 defense and remains with 825 vitality Mythrandir's Dark Archer (840124) does weaken to weak creature(s) of *Miq* and:- Weaken defence effect: -75 - maintains weaken on Remains (841570) weaken (round:3 weaken: defence=-75|from -350 to -425; ) Remains (841570) now has 825 VE and -425 defense and remains with 825 vitality Mythrandir's Unholy Priest II (836171) does protect to dying creature(s) of *Miq* and:- Protection effect: 80 - Remains (841570) is protected by Unholy Priest II (836171) with defence, maintaining protection protect (round:3 protect: defence=80|from -425 to -345; ) Remains (841570) now has 825 VE and -345 defense and remains with 825 vitality Mythrandir's Dark Archer (840125) does weaken to weak creature(s) of *Miq* and:- Weaken defence effect: -75 - maintains weaken on Remains (841570) weaken (round:3 weaken: defence=-75|from -345 to -420; ) Remains (841570) now has 825 VE and -420 defense and remains with 825 vitality *Miq*'s Remains (841570) does protect to dying creature(s) of *Miq* and:- Protection effect: 40 - Remains (841570) is protected by Remains (841570) with defence, maintaining protection protect (round:3 protect: defence=40|from -420 to -380; ) Remains (841570) now has 785 VE and -420 defense and remains with 785 vitality Mythrandir's Grasan Huvourer (835144) does weaken to all creature(s) of *Miq* and:- Weaken defence effect: -150 - maintains weaken on Remains (841570) weaken (round:3 weaken: defence=-150|from -380 to -530; ) Remains (841570) now has 785 VE and -530 defense and remains with 785 vitality ###### START ROUND "3” ###### Applying temporary effects for *Miq*, slot 2 : weaken (round:2 weaken: defence=-75|from -350 to -425; ) protect (round:3 protect: defence=80|from -425 to -345; ) weaken (round:2 weaken: defence=-75|from -345 to -420; ) protect (round:3 protect: defence=40|from -420 to -380; ) weaken (round:2 weaken: defence=-150|from -380 to -530; ) Mythrandir’s Imperial Aramor Assassin (830050) does damage to weak creature(s) of *Miq* and:- Remains (841570) receives 725 damage correct; Aramor attack: 195 - Remains (current) defense: -530 = damage: 725Remains (841570) now has 60 VE and -530 defense and remains with 60 vitality Mythrandir's Dark Archer (840124) does weaken to weak creature(s) of *Miq* and:- Weaken defence effect: -15 - maintains weaken on Remains (841570) weaken (round:3 weaken: defence=-15|from -530 to -545; ) Weaken Defense issue: because Dark Archer (240124)'s attack was greater than Remains (841570)'s current VE, the attack became attack_value - target_current_VE_value: 75-60=15 Remains (841570) now has 60 VE and -530 defense and remains with 60 vitality Mythrandir's Unholy Priest II (836171) does protect to dying creature(s) of *Miq* and:- Protection effect: 80 - Remains (841570) is protected by Unholy Priest II (836171) with defence, maintaining protection protect (round:3 protect: defence=80|from -545 to -465; ) Remains (841570) now has 60 VE and -465 defense and remains with 60 vitality Mythrandir's Dark Archer (840125) does weaken to weak creature(s) of *Miq* and:- Weaken defence effect: -15 - maintains weaken on Remains (841570) weaken (round:3 weaken: defence=-15|from -465 to -480; ) Weaken Defense same issue Remains (841570) now has 60 VE and -480 defense and remains with 60 vitality *Miq*'s Remains (841570) does protect to dying creature(s) of *Miq* and:- Protection effect: 20 - Remains (841570) is protected by Remains (841570) with defence, maintaining protection protect (round:3 protect: defence=20|from -480 to -460; ) Martirism Issue: because Remains (841570)'s current VE was greater than Remains (841570)'s power, the power became caster_current_VE_value - power_value: 60-40=20 Remains (841570) now has 40 VE and -460 defense and remains with 40 vitality Mythrandir's Grasan Huvourer (835144) does weaken to all creature(s) of *Miq* and:- Weaken defence effect: -110 - maintains weaken on Remains (841570) weaken (round:3 weaken: defence=-110|from -460 to -570; ) Weaken Defense same issue Remains (841570) now has 40 VE and -570 defenseand remains with 40 vitality ###### START ROUND "4” ###### Applying temporary effects for *Miq*, slot 2 : weaken (round:2 weaken: defence=-75|from -390 to -465; ) protect (round:3 protect: defence=80|from -465 to -385; ) weaken (round:2 weaken: defence=-75|from -385 to -460; ) protect (round:3 protect: defence=40|from -460 to -420; ) weaken (round:2 weaken: defence=-150|from -420 to -570; ) Mythrandir’s Imperial Aramor Assassin (830050) does damage to weak creature(s) of *Miq* and: - Remains (841570) receives 765 damage creature DIES! Mythrandir's Dark Archer (840124) cant find any enemy creatures to target, skipping turn ... Mythrandir WINS! Creature Experience reward for Mythrandir - Winning player Imperial Aramor Assassin (830050) gains 413 Xp and a won battle Grasan Huvourer (835144) gains 413 Xp and a won battle Unholy Priest II (836171) recovers 52.8 Vitality Unholy Priest II (836171) gains 413 Xp and a won battle Dark Archer (840124) gains 413 Xp and a won battle Dark Archer (840125) gains 413 Xp and a won battle Creature Experience reward for *Miq* - Losing player No creatures survived the fight for this player, no xp reward Winner does not get a won fight point Loser gets humiliated, loss fights counter incremented![/log] I'm gonna break down what's happening above the way I see it, in IFs and ELSEs. 1. Weaken Defense (edited) IF1 targ_curr_VE - cast_curr_att >= cast_curr_att | cast_temp/used_att = cast_curr_att | ELSE1 |IF2 targ_curr_VE - cast_curr_att > 0 || cast_temp/used_att = targ_curr_VE - cast_curr_att || ELSE2 || cast_temp/used_att = cast_curr_att - targ_curr_VE |ENDIF2 ENDIF1 That ELSE simply shouldn't exist. In light of more testing, it appears the formulas are almost the same for weaken and martyr, differences being that 1. one takes into account attack and the other one power; 2. weaken has a 2nd "IF" which doesn't let it go negative the way martyr does. What's wrong is that Weaken Defense becomes weaker, as it is now. To solve, just remove the clauses above entirely. Attack shouldn't change based on target VE. 2. Martirism (edited) IF1 | cast_curr_VE - cast_curr_pow >= cast_curr_pow | cast_temp/used_pow = cast_curr_pow & cast_curr_VE = cast_curr_VE - cast_temp/used_pow | ELSE1 | IF2 | | cast_curr_VE - cast_curr_pow > 0 | | cast_temp/used_pow = cast_curr_VE - cast_curr_pow & cast_curr_VE = cast_curr_VE - cast_temp/used_pow | | ELSE2 | | cast_temp/used_pow = cast_curr_pow - cast_curr_VE & cast_curr_VE = cast_curr_VE - cast_temp/used_pow | ENDIF2 ENDIF1 I looked again at the values and found that there is no second IF, so the formula using IFs actually looks like this: IF1 | cast_curr_VE - cast_curr_pow >= cast_curr_pow | cast_temp/used_pow = cast_curr_pow & cast_curr_VE = cast_curr_VE - cast_temp/used_pow | ELSE | cast_temp/used_pow = cast_curr_VE - cast_curr_pow & cast_curr_VE = cast_curr_VE - cast_temp/used_pow ENDIF The ELSE causes the self heal Ary mentioned a few months ago. It occurs when caster VE - caster power < 0, and can be fixed with a second IF/ELSE clause: Case 1: low VE martyr caster shouldn't cast if its VE is lower than its power IF1 | cast_curr_VE - cast_curr_pow >= cast_curr_pow | cast_temp/used_pow = cast_curr_pow & cast_curr_VE = cast_curr_VE - cast_temp/used_pow | ELSE1 | IF2 | | cast_curr_VE - cast_curr_pow > 0 | | cast_temp/used_pow = cast_curr_VE - cast_curr_pow & cast_curr_VE = cast_curr_VE - cast_temp/used_pow | | ELSE2 | | cast_temp/used_pow = 0 & cast_curr_VE = cast_curr_VE - cast_temp/used_pow | ENDIF2 ENDIF1 Case 2: low VE martyr caster should cast if its VE is lower than its power, only as much as its VE allows it IF1 | cast_curr_VE - cast_curr_pow >= cast_curr_pow | cast_temp/used_pow = cast_curr_pow & cast_curr_VE = cast_curr_VE - cast_temp/used_pow | ELSE1 | IF2 | | cast_curr_VE - cast_curr_pow > 0 | | cast_temp/used_pow = cast_curr_VE - cast_curr_pow & cast_curr_VE = cast_curr_VE - cast_temp/used_pow | | ELSE2 | | cast_temp/used_pow = cast_curr_pow - cast_curr_VE & cast_curr_VE = cast_curr_VE - cast_temp/used_pow | ENDIF2 ENDIF1 Mini Legend Vital Energy, attack, power, caster, target, current, temporary Edited September 15, 2015 by Myth Ary Endleg and Ungod 2 Quote Link to comment Share on other sites More sharing options...
Ary Endleg Posted September 8, 2015 Report Share Posted September 8, 2015 Oh so that's the cause of weaken def doing silly small numbers, nice. Quote Link to comment Share on other sites More sharing options...
Myth Posted September 8, 2015 Author Report Share Posted September 8, 2015 Yeah, that's why. :p And in the case of target all, the attack is calculated based on each target's VE individually. Quote Link to comment Share on other sites More sharing options...
Myth Posted September 15, 2015 Author Report Share Posted September 15, 2015 Retested. First post updated with correct clauses and possible fixes. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.