Commit 3431773b authored by HidarimeYume's avatar HidarimeYume Committed by GitHub

Fix Predaplant Moray Nepenthes and Infinitrack Xyz monsters (#1769)

parent c95b5a0c
......@@ -14,7 +14,7 @@ function c22011689.initial_effect(c)
e2:SetCategory(CATEGORY_EQUIP)
e2:SetCode(EVENT_BATTLE_DESTROYING)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCondition(aux.bdocon)
e2:SetCondition(c22011689.eqcon)
e2:SetTarget(c22011689.eqtg)
e2:SetOperation(c22011689.eqop)
c:RegisterEffect(e2)
......@@ -33,6 +33,12 @@ end
function c22011689.atkval(e,c)
return Duel.GetCounter(0,1,1,0x1041)*200
end
function c22011689.eqcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
return c:IsRelateToBattle() and c:IsStatus(STATUS_OPPO_BATTLE) and bc:IsType(TYPE_MONSTER)
and (bc:IsLocation(LOCATION_GRAVE) or bc:IsFaceup() and bc:IsLocation(LOCATION_EXTRA+LOCATION_REMOVED))
end
function c22011689.eqtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
local bc=e:GetHandler():GetBattleTarget()
......
......@@ -65,6 +65,7 @@ function c24701066.xyzcon(e,tp,eg,ep,ev,re,r,rp)
if not c:IsRelateToBattle() then return false end
e:SetLabelObject(tc)
return tc and tc:IsType(TYPE_MONSTER) and tc:IsReason(REASON_BATTLE) and tc:IsCanOverlay()
and (tc:IsLocation(LOCATION_GRAVE) or tc:IsFaceup() and tc:IsLocation(LOCATION_EXTRA+LOCATION_REMOVED))
end
function c24701066.xyztg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsType(TYPE_XYZ) end
......
......@@ -55,6 +55,7 @@ function c60195675.xyzcon(e,tp,eg,ep,ev,re,r,rp)
if not c:IsRelateToBattle() then return false end
e:SetLabelObject(tc)
return tc and tc:IsType(TYPE_MONSTER) and tc:IsReason(REASON_BATTLE) and tc:IsCanOverlay()
and (tc:IsLocation(LOCATION_GRAVE) or tc:IsFaceup() and tc:IsLocation(LOCATION_EXTRA+LOCATION_REMOVED))
end
function c60195675.xyztg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsType(TYPE_XYZ) end
......
......@@ -63,6 +63,7 @@ function c97584719.xyzcon(e,tp,eg,ep,ev,re,r,rp)
if not c:IsRelateToBattle() then return false end
e:SetLabelObject(tc)
return tc and tc:IsType(TYPE_MONSTER) and tc:IsReason(REASON_BATTLE) and tc:IsCanOverlay()
and (tc:IsLocation(LOCATION_GRAVE) or tc:IsFaceup() and tc:IsLocation(LOCATION_EXTRA+LOCATION_REMOVED))
end
function c97584719.xyztg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsType(TYPE_XYZ) end
......
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