Snarky, could you please tell me about this function? and if I understan correctly this language?
MP2Check -> Checks, if the AI can wait until MP2 to summon a monster, or if it needs to summon it right away. MP2Check checks for the current phase (obviously), if the BP is even allowed, and if the opponent controls stronger monsters. This is done, so the AI can attack with the materials before XYZing to maybe get more damage in.
Negated and NotNegated check, if a card is currently (not) negated, or is about to be negated when it hits the field. Simple as that. If the card is on the field, it checks for the EFFECT_DISABLED, if its in a different location, it will check for stuff like Skill Drain, Jinzo, Decree, Majesty's Fiend, stuff like that.
OppHasStrongestMonster -> checks, if the opponent currently controls the strongest monster on the field. Pretty straight forward.
The summoning condition in its entirety should summon Imp King, if it is not negated on the field and has valid targets in the deck, with the option to wait until MP2. Or it will summon him, if it will be negated on the field (Skill Drain maybe), and the opponent currently controls the strongest monster on the field but Imp King would be stronger. Not much sense to XYZ under Skill Drain, if not to get a monster with stronger ATK, right? If your monsters are stronger anyway, it would just waste an XYZ summon.
So, far I've managed to copy-paste the functions for Feral Imp and Shark Knight. But Shark K. randomly targets my monsters. I still need to figure out how it decides what monster will "absorb".
Well, that is handled in OnSelectCard again. You can make this really easy for yourself:
function SharkKnightTarget(cards,min) -- pass the minTargets count as well, just to be on the safe side.
return BestTargets(cards,min,TARGET_OTHER) --Remember, the detach part targets 2 cards
end
Normally, you would use Add for the detach, but since it usually detaches all materials at once anyway, you don't need to bother. Just make sure, you return the correct count, otherwise, you'll get an error message. And, as usual, you need to call that function in OnSelectCard.
Edited by user
2015-03-10T21:07:11Z
|
Reason: Not specified