Skip to content

ManaArmor #3

@bk-bknight

Description

@bk-bknight

In higher levels, there are enemies hidden in the chests. Sometimes, they successfully hurt my armor or my heartss.
If you don't own enough armor, the number of lives(=hearts) would be reduced in the long run, so I extended the script (v3.3 !!) with this:
:name bk:ManaArmor

gotoif(4, ((adventure.playerArmor() == adventure.manaArmor()) ||
(adventure.mana() < 5)) ||
not(adventure.hasItem("manaReaver")))
adventure.useSpell("manaArmor")
goto(1)
adventure.wait()
wait(0.0)

I replaced line 3 (within the TPT2-AI editor) (both v3.3 and v.3.4), line 11 (within your Scripteditor without comments) in the "kill enemies"-script, since I didn't want to interfere too much in your script. In v3.4 the replaced line should be 34 (within your Scripteditor and with comments)
old:
adventure.wait()
new:
executesync("bk:ManaArmor") (Scripteditor)

Perhaps, you can use this idea for v3.5

Be warned:
If your regular armor is less than the attack of the bad guys, we'll end up in an endless loop, because the guys will remove mana armor, which will be replenished by my extension. Afterwards the orginal script tries to replenish the mana and retries the map. But this will lead to the next loss of mana armor.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions