Commit 7186285e authored by Tachibana's avatar Tachibana

watele

parent 8a19663a
Pipeline #6839 passed with stages
in 27 minutes and 36 seconds
......@@ -21,7 +21,6 @@ function c16101076.initial_effect(c)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCondition(c16101076.descon)
e3:SetTarget(c16101076.destg)
e3:SetOperation(c16101076.desop)
c:RegisterEffect(e3)
......@@ -46,9 +45,6 @@ end
function c16101076.mfilter(c)
return c:IsRace(RACE_DRAGON) and c:IsFusionType(TYPE_EFFECT)
end
function c16101076.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffectLabel(37818795) and e:GetHandler():GetFlagEffectLabel(37818795)>0
end
function c16101076.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_MZONE,1,nil)
......
......@@ -17,7 +17,7 @@ function cm.initial_effect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_RECOVER)
e2:SetRange(LOCATION_SZONE)
--e2:SetCountLimit(1)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCondition(cm.thcon)
e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop)
......
......@@ -18,6 +18,7 @@ function cm.initial_effect(c)
e2:SetRange(LOCATION_SZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetCost(cm.cost)
e2:SetTarget(cm.destg)
e2:SetOperation(cm.desop)
c:RegisterEffect(e2)
......@@ -43,6 +44,10 @@ end
function cm.ctfilter(c)
return c:IsControlerCanBeChanged()
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,1000) end
Duel.PayLPCost(tp,1000)
end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(cm.desfilter,tp,LOCATION_MZONE,0,1,nil)
......
......@@ -87,17 +87,17 @@ function cm.spop2(e,tp,eg,ep,ev,re,r,rp)
end
end
--activate
function cm.filter2(c)
return rk.check(c,"FAIRY") and c:IsType(TYPE_CONTINUOUS)
function cm.filter2(c,tp)
return rk.check(c,"FAIRY") and c:IsType(TYPE_CONTINUOUS) and c:GetActivateEffect():IsActivatable(tp,true,false)
end
function cm.acttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_DECK,0,1,nil) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_DECK,0,1,nil,tp) end
end
function cm.actop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return false end
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return false end
local g=Duel.SelectMatchingCard(tp,cm.filter2,tp,LOCATION_DECK,0,1,1,nil)
local g=Duel.SelectMatchingCard(tp,cm.filter2,tp,LOCATION_DECK,0,1,1,nil,tp)
local tc=g:GetFirst()
if tc then
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
......
......@@ -18,7 +18,7 @@ function cm.cfilter(c,e,tp)
and Duel.IsExistingMatchingCard(cm.exc,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil,e,tp,c:GetAttribute(),c:GetRank()+c:GetLevel())
end
function cm.exc(c,e,tp,att,lv)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsAttribute(att) and (c:IsLevel(lv) or c:IsRank(lv)) and ((c:IsLocation(LOCATION_DECK) and Duel.GetMZoneCount(tp,mc)) or (c:IsLocation(LOCATION_MZONE) and Duel.GetLocationCountFromEx(tp,tp,mc,c)))
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsAttribute(att) and (c:IsLevel(lv) or c:IsRank(lv)) and ((c:IsLocation(LOCATION_DECK) and Duel.GetMZoneCount(tp,mc)) or (c:IsLocation(LOCATION_MZONE) and Duel.GetLocationCountFromEx(tp,tp,mc,c))) and c:IsRace(RACE_DRAGON)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(100)
......
......@@ -73,7 +73,7 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return re:IsActiveType(TYPE_MONSTER) and re:GetActivateLocation(LOCATION_ONFIELD) and Duel.IsChainNegatable(ev)
return re:IsActiveType(TYPE_MONSTER) and Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)==LOCATION_MZONE and Duel.IsChainNegatable(ev)
end
function cm.rmc(c,att)
return c:IsAbleToRemoveAsCost() and c:IsAttribute(att)
......
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