Skip to content
User Avatar
#2704
Auto-translated
I came up with a similar algorithm, although I've put this task on hold for now, but I'll share my thoughts:

on paper, my structure is roughly like this:
if(combatReadyPerson() == "name of the desired hero")
get data about the enemy creatures using GetCreatures() and GetCreatureNumber()

then you need to find out if the hero's turn is over:
repeat
current_mana = GetUnitManaPoints("name of the desired hero")
until(isCreature(combatReadyPerson()))

next, we check if the number of mana and enemy creatures has changed, and based on this, we conclude whether a spell was cast and what its effect was

I'm not sure how accurate my assumptions are, as I've been focusing on more understandable tasks for myself)
Нет войне.