AI problem

  • I tried the following AI. The healing section worked fine, but Timon kept casting Mystic Arrow on pieces of paper and Shrubs, even when there were neither pieces of paper nor shrubs to be found. Does anyone have any idea why this is happening? By the way, he did cast a mystic arrow on a ruffian twice during an extended combat. I know I didn't put in a catch to prevent him from trying to cast heal when he didn't have enough mana. That is not the problem, I am quite certain.

    NAME "Timon Alpha"

    ; Out of MP? RUN!
    IF NOT ManaAtLeast(4) THEN

    ; if someone is in need of healing, take care of that.
    IF HealthLessThan(ally.ByWeakest.Best, Wounded) THEN
    #75 CastSpell(last,10)
    #25 Continue()

    ; otherwise, snipe
    IF InLOS(enemy.ByWeakest.Best) THEN
    #100 CastSpell(enemy.ByWeakest.Best, 18)

    IF InLOS(enemy.ByDamage.Best) THEN
    #100 CastSpell(enemy.ByDamage.Best, 18)

    IF InLOS(enemy.ByRange.Best) THEN
    #100 CastSpell(enemy.ByRange.Best,18)

    ; if no one is in sight, advance.
    IF Exists(enemy.ByRange.Best) THEN
    #100 RunToward(last, 4)

    IF True() THEN
    #100 FinishCombat()


  • I know something about the shrub problem. I tried to resurect the dead ruffian in the Land Kings hall, the ruffian dissapeared and i got one of the messages, "brought shrub back from the brink of death" and "brought (puddle, water, something wet) back from the brink of death".

    Is it possible that it could get confused about the order of who to attack?

    Talk, talk, talk to myself!

Log in to reply