Commit 100bd4d0 authored by POLYMER's avatar POLYMER

fix

parent 9f7778b8
No preview for this file type
--征服之龙 莫尔菲萨
local m=40010418
local cm=_G["c"..m]
cm.named_with_DragWizard=1
function cm.DragWizard(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_DragWizard
end
function cm.initial_effect(c)
c:EnableReviveLimit()
aux.AddXyzProcedure(c,nil,6,2,nil,nil,99)
--tograve
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.tgcon)
e1:SetTarget(cm.mttg)
e1:SetOperation(cm.mtop)
c:RegisterEffect(e1)
--negate
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_NEGATE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,m+1)
e2:SetCondition(cm.discon)
e2:SetTarget(cm.distg)
e2:SetOperation(cm.disop)
c:RegisterEffect(e2)
--damage
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetRange(LOCATION_MZONE)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCountLimit(1)
e3:SetOperation(cm.rmop)
c:RegisterEffect(e3)
end
function cm.tgcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
end
function cm.mtfilter(c)
return cm.DragWizard(c) and c:IsCanOverlay()
end
function cm.mttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsType(TYPE_XYZ)
and Duel.IsExistingMatchingCard(cm.mtfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil) end
end
function cm.mtop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or c:IsFacedown() then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local g=Duel.SelectMatchingCard(tp,cm.mtfilter,tp,LOCATION_HAND,0,1,1,nil)
if g:GetCount()>0 then
Duel.Overlay(c,g)
end
end
function cm.disfilter(c)
return c:IsLevel(1)
end
function cm.discon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev) and Duel.IsExistingMatchingCard(cm.disfilter,tp,LOCATION_GRAVE,0,10,nil)
end
function cm.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
end
function cm.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=re:GetHandler()
if Duel.NegateActivation(ev) and c:IsRelateToEffect(e) and rc:IsRelateToEffect(re) and c:IsType(TYPE_XYZ) then
rc:CancelToGrave()
Duel.Overlay(c,Group.FromCards(rc))
end
end
function cm.rmop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_EFFECT)
end
\ No newline at end of file
......@@ -3,6 +3,23 @@ yume=yume or {}
if c71401001 then
function c71401001.initial_effect(c)
--spsummon
--[[
Auxiliary effect to ensure this card in GY before effect cost for Magician's Rod.
In case of issues where this effect could activate when sent to GY because of effect cost,
such as tributed by Enemy Controller
or destroyed when Call of the Haunted was sent to GY by Forbidden Droplet.
Be informed that do not use this if the effect is a quick effect(Paleozoic)
or the trigger location is Hand according to game ruling.
]]
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_ACTIVATE_COST)
e0:SetRange(LOCATION_GRAVE+LOCATION_REMOVED)
e0:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e0:SetTargetRange(1,0)
e0:SetTarget(c71401001.costtg)
e0:SetOperation(aux.chainreg)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(71401001,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
......@@ -33,8 +50,12 @@ function c71401001.initial_effect(c)
c:RegisterEffect(e2a)
yume.ButterflyCounter()
end
function c71401001.costtg(e,te,tp)
return te:IsActiveType(TYPE_MONSTER)
end
function c71401001.con1(e,tp,eg,ep,ev,re,r,rp)
return re:IsActiveType(TYPE_MONSTER)
local c=e:GetHandler()
return c:GetFlagEffect(FLAG_ID_CHAINING)>0 or re:IsActiveType(TYPE_MONSTER) and c:IsLocation(LOCATION_HAND)
end
function c71401001.filterc1(c,tp)
return c:IsFaceup() and c:IsType(TYPE_CONTINUOUS) and c:IsAbleToRemoveAsCost()
......
......@@ -2,6 +2,23 @@
if not c71401001 then dofile("expansions/script/c71401001.lua") end
function c71401007.initial_effect(c)
--spsummon
--[[
Auxiliary effect to ensure this card in GY before effect cost for Magician's Rod.
In case of issues where this effect could activate when sent to GY because of effect cost,
such as tributed by Enemy Controller
or destroyed when Call of the Haunted was sent to GY by Forbidden Droplet.
Be informed that do not use this if the effect is a quick effect(Paleozoic)
or the trigger location is Hand according to game ruling.
]]
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_ACTIVATE_COST)
e0:SetRange(LOCATION_GRAVE+LOCATION_REMOVED)
e0:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e0:SetTargetRange(1,0)
e0:SetTarget(c71401007.costtg)
e0:SetOperation(aux.chainreg)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(71401001,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
......@@ -29,8 +46,12 @@ function c71401007.initial_effect(c)
c:RegisterEffect(e2)
yume.ButterflyCounter()
end
function c71401007.costtg(e,te,tp)
return te:IsActiveType(TYPE_SPELL+TYPE_TRAP)
end
function c71401007.con1(e,tp,eg,ep,ev,re,r,rp)
return re:IsActiveType(TYPE_SPELL+TYPE_TRAP)
local c=e:GetHandler()
return c:GetFlagEffect(FLAG_ID_CHAINING)>0 or re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and c:IsLocation(LOCATION_HAND)
end
function c71401007.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemoveAsCost,tp,LOCATION_HAND,0,1,e:GetHandler()) and Duel.GetCustomActivityCount(71401001,tp,ACTIVITY_CHAIN)==0 end
......
......@@ -67,7 +67,7 @@ function c88800014.hcfilter(c)
return c:IsFaceup() and c:IsSetCard(0xc01)
end
function c88800014.handcon(e)
return Duel.IsExistingMatchingCard(c88800014.hcfilter,e:GetHandlerPlayer(),LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
return Duel.IsExistingMatchingCard(c88800014.hcfilter,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,1,nil)
end
function c88800014.rlcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c88800014.costfilter,tp,LOCATION_GRAVE,0,1,nil) end
......
......@@ -67,7 +67,7 @@ function c88800015.hcfilter(c)
return c:IsFaceup() and c:IsSetCard(0xc01)
end
function c88800015.handcon(e)
return Duel.IsExistingMatchingCard(c88800015.hcfilter,e:GetHandlerPlayer(),LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
return Duel.IsExistingMatchingCard(c88800015.hcfilter,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,1,nil)
end
function c88800015.rlcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c88800015.costfilter,tp,LOCATION_GRAVE,0,1,nil) 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