Test 26 problem.
Looks like many peoples are passed test, but i can't. I am trying to do it step by step and got army_1 victory
army_1 = Army() army_2 = Army() army_1.add_units(Warrior, 2) army_1.add_units(Lancer, 3) army_1.add_units(Defender, 1) army_1.add_units(Warlord, 1) army_2.add_units(Warlord, 5) army_2.add_units(Vampire, 1) army_2.add_units(Rookie, 1) army_2.add_units(Knight, 1) army_1.units[0].equip_weapon(Sword()) army_2.units[0].equip_weapon(Shield()) army_1.move_units() army_2.move_units() battle = Battle() battle.straight_fight(army_1, army_2))
After units creation, adding weapons and move I have
Army 1
- Lancer(h:50,a:6)
- Warrior(h:55,a:7:) - with Sword
- Warrior(h:50,a:5)
- Lancer(h:50,a:6)
- Lancer(h:50,a:6)
- Defender(h:60,a:3,d:2)
- Warlord(h:100,a:4,d:2)
Army 2
- Vampire(h:40,a:4,v:50%)
- Rookie(h:50,a:1)
- Knight(h:50,a:7)
- Warlord(h:120,a:3,d:4) - with Shield
And Army 2 Warlord loose in fight with last Army 2 Lancer. It need 3 health points more to win.
Where I wrong? In set up before battle, or in straight_fight?