Greetings,
I'm new to AI & LUA and got a question regarding AI priority.
The issue: I don't know how to get the AI to keep summoning in Attack-Mode, once I got a strong tribute monster on the field, while it could easily kill my other low ATK monster/s.
Example: I have Jinzo and Celtic Guard on the field. AI decides on their turn, to summon Vorse Raider with its 1900 ATK in face-down defence position.
AI could easily kill my Celtic Guard, which would most likely be a much wiser decision(when they have enough LP left) in general.
How do I get the AI to act that way?
I think I might've found the correct lua file, but I don't understand much of this. It's from SelectPosition.lua
------------------------------------------------------
-- Check if AI's monster's attack is lower than of strongest player's monster,
-- or if any actions can be taken to gain advantage over player.
-- Then summon or set monster in available position depending on results.
------------------------------------------------------
if band(POS_FACEDOWN_DEFENCE,available) > 0 and Get_Card_Count_Pos(OppMon(), POS_FACEUP) > 0 then
if AIMonGetAttackById(id) < Get_Card_Att_Def(OppMon(),"attack",">",POS_FACEUP_ATTACK,"attack") and CanChangeOutcomeSS(id) == 0 and AIMonGetAttackById(id) < 2400 then -- Also check if any action can be taken by CanChangeOutcomeSS
result = POS_FACEDOWN_DEFENCE
end
end
if band(POS_FACEUP_DEFENCE,available) > 0 and Get_Card_Count_Pos(OppMon(), POS_FACEUP) > 0 then
if AIMonGetAttackById(id) < Get_Card_Att_Def(OppMon(),"attack",">",POS_FACEUP_ATTACK,"attack") and CanChangeOutcomeSS(id) == 0 and AIMonGetAttackById(id) < 2400 then -- Also check if any action can be taken by CanChangeOutcomeSS
result = POS_FACEUP_DEFENCE
end
end
Also I tried messing with "result = POS_FACEUP_ATTACK" which is located in the same file, to make the AI summon specific cards like
Reflect Bounder or
Marauding Captain always in attack position, no matter what. But somehow it still prefers the above script and keeps setting them due to this.
EDIT: Sorry about the script formatting, I don't know how to get it correctly displayed.
Edited by user
2018-01-28T23:14:49Z
|
Reason: grammar, script formatting