Commit e5ab1dcc authored by Grajade's avatar Grajade

Update c74563002.lua

parent b3dbb8b5
...@@ -25,23 +25,31 @@ function c74563002.initial_effect(c) ...@@ -25,23 +25,31 @@ function c74563002.initial_effect(c)
e4:SetOperation(c74563002.desop) e4:SetOperation(c74563002.desop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function c74563002.tfilter(c)
return c:IsSetCard(0x497) and c:IsFaceup()
end
function c74563002.actcon(e) function c74563002.actcon(e)
return Duel.IsExistingMatchingCard(Card.IsSetCard,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil,0x497) return Duel.IsExistingMatchingCard(c74563002.tfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
end end
function c74563002.negcost(e,tp,eg,ep,ev,re,r,rp,chk) function c74563002.negcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsCanRemoveCounter(tp,1,1,0x128a,1,REASON_COST) end if chk==0 then return Duel.IsCanRemoveCounter(tp,1,1,0x128a,1,REASON_COST) end
Duel.RemoveCounter(tp,1,1,0x128a,1,REASON_COST) Duel.RemoveCounter(tp,1,1,0x128a,1,REASON_COST)
end end
function c74563002.target(e,tp,eg,ep,ev,re,r,rp,chk) function c74563002.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end local ft1=Duel.GetLocationCount(tp,LOCATION_MZONE)
local ft2=Duel.GetLocationCount(1-tp,LOCATION_MZONE,tp)
if chk==0 then return ft1>0 and ft2>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,74563020,nil,TYPES_TOKEN_MONSTER,0,0,1,RACE_AQUA,ATTRIBUTE_WATER,POS_FACEUP_DEFENSE)
and Duel.IsPlayerCanSpecialSummonMonster(tp,74563020,nil,TYPES_TOKEN_MONSTER,0,0,1,RACE_AQUA,ATTRIBUTE_WATER,POS_FACEUP_DEFENSE,1-tp)
and not Duel.IsPlayerAffectedByEffect(tp,59822133) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,2,0,0) Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,0,0)
end end
function c74563002.activate(e,tp,eg,ep,ev,re,r,rp) function c74563002.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or Duel.GetLocationCount(1-tp,LOCATION_MZONE)<=0 or Duel.GetLocationCount(1-tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,74563020,0,TYPES_TOKEN_MONSTER,0,0,1,RACE_MACHINE,ATTRIBUTE_DARK,POS_FACEUP_DEFENSE) or not Duel.IsPlayerCanSpecialSummonMonster(tp,74563020,nil,TYPES_TOKEN_MONSTER,0,0,1,RACE_AQUA,ATTRIBUTE_WATER,POS_FACEUP_DEFENSE)
or not Duel.IsPlayerCanSpecialSummonMonster(tp,74563020,0,TYPES_TOKEN_MONSTER,0,0,1,RACE_AQUA,ATTRIBUTE_WATER,POS_FACEUP_DEFENSE,1-tp) or not Duel.IsPlayerCanSpecialSummonMonster(tp,74563020,nil,TYPES_TOKEN_MONSTER,0,0,1,RACE_AQUA,ATTRIBUTE_WATER,POS_FACEUP_DEFENSE,1-tp)
or Duel.IsPlayerAffectedByEffect(tp,59822133) then return end or Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
local token1=Duel.CreateToken(tp,74563020) local token1=Duel.CreateToken(tp,74563020)
local token2=Duel.CreateToken(tp,74563020) local token2=Duel.CreateToken(tp,74563020)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment