MantisBT - VCMI
View Issue Details
0000123VCMIMechanics - Battlespublic2009-10-08 02:252022-04-11 17:49
Steven Aus 
Warmonger 
normalminoralways
closedfixed 
0.74 
0.94 
0000123: Resurrection spell in battle doesn't work yet (UPDATE: since 0.8 it works, but not correctly).
So, for the moment you need to win without losing any troops at any stage to win without any casualties. =)
No tags attached.
related to 0001358closed Warmonger Resurrection: it seems that you can't cast it on already dead stacks 
Issue History
2009-10-08 02:25Steven AusNew Issue
2009-10-17 14:33Tow dragonNote Added: 0000117
2009-10-17 14:33Tow dragonStatusassigned => resolved
2009-10-17 14:33Tow dragonResolutionopen => fixed
2009-12-01 21:56TowFixed in Version => 0.75
2009-12-23 00:06ZamolxisNote Added: 0000470
2009-12-23 00:06ZamolxisStatusresolved => feedback
2009-12-23 00:06ZamolxisResolutionfixed => reopened
2009-12-23 00:06ZamolxisNote Edited: 0000470bug_revision_view_page.php?bugnote_id=470#r484
2010-01-29 16:35Tow dragonNote Added: 0000589
2010-01-29 16:35Tow dragonStatusfeedback => resolved
2010-01-29 16:35Tow dragonFixed in Version0.75 => 0.89
2010-01-29 16:35Tow dragonResolutionreopened => fixed
2010-07-10 10:14ZamolxisNote Added: 0001055
2010-07-10 10:14ZamolxisStatusresolved => feedback
2010-07-10 10:14ZamolxisResolutionfixed => reopened
2010-07-10 10:19ZamolxisNote Edited: 0001055bug_revision_view_page.php?bugnote_id=1055#r932
2010-07-10 10:20ZamolxisNote Edited: 0001055bug_revision_view_page.php?bugnote_id=1055#r933
2010-07-10 10:29ZamolxisNote Edited: 0001055bug_revision_view_page.php?bugnote_id=1055#r934
2010-07-10 10:33ZamolxisNote Edited: 0001055bug_revision_view_page.php?bugnote_id=1055#r935
2010-07-10 10:35ZamolxisNote Edited: 0001055bug_revision_view_page.php?bugnote_id=1055#r936
2010-07-24 23:48ZamolxisNote Edited: 0001055bug_revision_view_page.php?bugnote_id=1055#r989
2011-09-26 22:37ZamolxisFixed in Version0.8 =>
2011-09-26 22:37ZamolxisSummaryResurrection spell in battle doesn't work yet (it doesn't restore hitpoints or any of the troops that have perished). => Resurrection spell in battle doesn't work yet (UPDATE: since 0.8 it works, but not correctly).
2011-09-27 05:30WarmongerStatusfeedback => assigned
2011-09-27 05:30WarmongerAssigned ToTow dragon => Warmonger
2011-09-27 05:30WarmongerNote Added: 0002068
2011-09-27 07:35ZamolxisNote Edited: 0001055bug_revision_view_page.php?bugnote_id=1055#r1428
2011-09-28 09:08WarmongerSeveritymajor => minor
2013-07-27 14:43WarmongerRelationship addedrelated to 0001358
2013-07-27 19:02WarmongerNote Added: 0003812
2013-07-27 19:02WarmongerStatusassigned => resolved
2013-07-27 19:02WarmongerFixed in Version => 0.94
2013-07-27 19:02WarmongerResolutionreopened => fixed
2022-04-11 17:49PovelitelStatusresolved => closed

Notes
(0000117)
Tow dragon   
2009-10-17 14:33   
seems to be fixed, but I didn't check all possible cases
(0000470)
Zamolxis   
2009-12-23 00:06   
Partially fixed, in the sense that it resurrects permanently, regardless of the skill level for Earth Magic, plus I believe it doesn't consider creature immunities yet (but that's another story). And I didn't check the costs and exact values yet.

As far as skill level is concerned, this is how it should work:
* Duration: Battle only (Untrained/Basic) / Permanent (Advanced/Expert)
* Untrained Cost: 20 / Trained Cost: 16
* Untrained / Basic: Target, allied troop with dead creatures has ((Power x 50) + 40) health worth of creatures restored to life for the duration of the current battle.
* Advanced: Same as Basic Effect, except that ((Power x 50) + 80) health worth of creatures are restored permanently.
* Expert: Same as Advanced Effect, except that ((Power x 50 + 160) health worth of creatures are restored.

(0000589)
Tow dragon   
2010-01-29 16:35   
Hopefully fixed in rev 1431. Please retest in the next version.
(0001055)
Zamolxis   
2010-07-10 10:14   
(edited on: 2011-09-27 07:35)
The spell is not yet implemented correctly. The cost is correct and perhaps the resurrection power formula is also correct (haven't tested yet). But it still resurrects permanently regardless of secondary skill level, can act as simple heal and can be wasted on healthy stacks. Here are all the remaining issues in detail:

1. It always has permanent effect in VCMI. In H3 it resurrects only for the course of the battle if the Earth Magic is basic or not present at all. Only Advanced/Expert allow us to keep the resurrected troops after the battle.

2. The description in the summary is misleading: Resurrection should NOT restore Hit Points if there are no creatures to resurrect in the stack. The rule is as follows: IF there is at least 1 dead creature in stack AND IF the hero has enough power to restore enough Hit Points to resurrect at least 1 dead creature, then the spell can apply to that creature. Let's take the example of a stack of 2 Azure Dragons and a hero with Resurrection which care restore 500 HP (= 5 Archangels):
- If the Azure Dragons receive 100 damage, hero cannot use Resurrection to restore those HP
- If the Azure Dragons receive 1100 damage, one dies and one is left with 900 HP, so hero can use Resurrection to restore 500 HP to the stack (2nd dragon resurrected with 400 HP) > [EDIT: Based on the info I found in Strategija.pdf, it seems this rule is incorrect. We always need resurrecting power at least equal to the health of 1 unit in that stack. I'll test one day to double check.]
- If the Azure Dragons receive 1600 damage, one dies and one is left with 400 HP, so hero cannot use Resurrection on it
- If the Azure Dragon left with 400 HP is killed, hero will not be able to resurrect it (he needs 1000+ HP restore power of the spell to resurrect if the last 1000 HP Dragon in the stack is killed).

Note: I'm only 90% sure of the above rules, based on experience. I don't have any documentation to back me up. When I have time, I'll prepare a test map to double check the above. But there is one thing I'm 100% sure of: Resurrection should NOT act as heal when there is nothing to resurrect.

3. In VCMI, spell can be applied on stacks which have not been affected by any damage (in H3 we get the "Not Applicable" barred circle mouse pointer over them)

4. In some cases, if we cast resurrection on a creature in full health, the spell even takes HP from that creature (e.g.: Crystal Dragons - take the map attached to 0000515 in Map Editor, and remove Earth Magic from Sir Mullich, then enter game, start a battle, and cast Resurrection on Crystal Dragons > they will go from 800 to 740 HP). This could be a separate bug, but there is no point to investigate and open a separate report, because if you implement the spell correctly, we should not be able to cast it on a healthy stack anyway.

(0002068)
Warmonger   
2011-09-27 05:30   
It explains why I can't make sense out of resurrection code ;)
(0003812)
Warmonger   
2013-07-27 19:02   
Fixed in r3472.