Commit 97ae9b49 authored by Nemo Ma's avatar Nemo Ma

fix

parent cae16d3e
...@@ -156,7 +156,7 @@ function cm.indtg(e,c) ...@@ -156,7 +156,7 @@ function cm.indtg(e,c)
end end
function cm.attg(e,c) function cm.attg(e,c)
return c:GetCounter(0x1015)~=0 return c:GetCounter(0x1015)>=3
end end
function cm.maop(e,tp,eg,ep,ev,re,r,rp) function cm.maop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -14,7 +14,6 @@ function cm.initial_effect(c) ...@@ -14,7 +14,6 @@ function cm.initial_effect(c)
e1:SetCode(EVENT_CHAIN_SOLVING) e1:SetCode(EVENT_CHAIN_SOLVING)
e1:SetRange(LOCATION_FZONE) e1:SetRange(LOCATION_FZONE)
e1:SetCondition(cm.cecondition) e1:SetCondition(cm.cecondition)
e1:SetTarget(cm.cetarget)
e1:SetOperation(cm.ceoperation) e1:SetOperation(cm.ceoperation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
...@@ -23,7 +22,6 @@ function cm.initial_effect(c) ...@@ -23,7 +22,6 @@ function cm.initial_effect(c)
e2:SetRange(LOCATION_FZONE) e2:SetRange(LOCATION_FZONE)
e2:SetCountLimit(1) e2:SetCountLimit(1)
e2:SetCondition(cm.rccon) e2:SetCondition(cm.rccon)
e2:SetTarget(cm.rctg)
e2:SetOperation(cm.rcop) e2:SetOperation(cm.rcop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--cannot be destroyed --cannot be destroyed
...@@ -79,10 +77,10 @@ end ...@@ -79,10 +77,10 @@ end
function cm.activate(e,tp,eg,ep,ev,re,r,rp) function cm.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_MUSIC,0,aux.Stringid(m,3)) Duel.Hint(HINT_MUSIC,0,aux.Stringid(m,3))
end end
function cm.damcon(e,tp,eg,ep,ev,re,r,rp) function cm.rccon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffectLabel() return e:GetHandler():GetFlagEffectLabel()
end end
function cm.damop(e,tp,eg,ep,ev,re,r,rp) function cm.rcop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,m) Duel.Hint(HINT_CARD,0,m)
Duel.Recover(Duel.GetTurnPlayer(),e:GetHandler():GetFlagEffectLabel(),REASON_EFFECT) Duel.Recover(Duel.GetTurnPlayer(),e:GetHandler():GetFlagEffectLabel(),REASON_EFFECT)
end end
...@@ -92,15 +90,9 @@ end ...@@ -92,15 +90,9 @@ end
function cm.actlimit(e,re,tp) function cm.actlimit(e,re,tp)
return re:IsActiveType(TYPE_FIELD) and re:IsHasType(EFFECT_TYPE_ACTIVATE) return re:IsActiveType(TYPE_FIELD) and re:IsHasType(EFFECT_TYPE_ACTIVATE)
end end
function cm.repop(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.SelectMatchingCard(tp,cm.thfilter,tp,0,LOCATION_MZONE,1,1,nil)
if sg:GetCount()>0 then
Duel.SendtoHand(sg,nil,REASON_EFFECT)
end
end
function cm.cecondition(e,tp,eg,ep,ev,re,r,rp) function cm.cecondition(e,tp,eg,ep,ev,re,r,rp)
local re1,ep1=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER) local re1=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
return ep~=tp and re1:IsActiveType(TYPE_MONSTER) return re1:IsActiveType(TYPE_MONSTER)
end end
function cm.ceoperation(e,tp,eg,ep,ev,re,r,rp) function cm.ceoperation(e,tp,eg,ep,ev,re,r,rp)
local re1,ep1=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER) local re1,ep1=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
......
...@@ -85,7 +85,7 @@ function cm.rccon(e,tp,eg,ep,ev,re,r,rp) ...@@ -85,7 +85,7 @@ function cm.rccon(e,tp,eg,ep,ev,re,r,rp)
return cm[0]>0 return cm[0]>0
end end
function cm.rcop(e,tp,eg,ep,ev,re,r,rp) function cm.rcop(e,tp,eg,ep,ev,re,r,rp)
if Duel.Recover(tp,cm[0],REASON_EFFECT)>=2500 then if Duel.Recover(tp,cm[0]*500,REASON_EFFECT)>=2500 then
Duel.Draw(tp,1,REASON_EFFECT) Duel.Draw(tp,1,REASON_EFFECT)
end end
end end
......
...@@ -59,12 +59,13 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -59,12 +59,13 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.Remove(sg,POS_FACEUP,REASON_EFFECT)~=0 then if Duel.Remove(sg,POS_FACEUP,REASON_EFFECT)~=0 then
local og=Duel.GetOperatedGroup() local og=Duel.GetOperatedGroup()
local oc=og:GetFirst() local oc=og:GetFirst()
local fid=c:GetFieldID()
while oc do while oc do
oc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,0,1) oc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,0,1,fid)
oc=og:GetNext() oc=og:GetNext()
end end
og:KeepAlive() og:KeepAlive()
e:SetLabel(c:GetFieldID()) e:SetLabel(fid)
e:SetLabelObject(og) e:SetLabelObject(og)
end end
if Duel.GetTurnPlayer()==tp then if Duel.GetTurnPlayer()==tp then
...@@ -85,7 +86,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -85,7 +86,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function cm.con(e) function cm.con(e)
return not Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,c) return not Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_ONFIELD,0,1,c)
end end
function cm.mtcon(e,tp,eg,ep,ev,re,r,rp) function cm.mtcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp return Duel.GetTurnPlayer()==tp
......
...@@ -16,11 +16,12 @@ function cm.initial_effect(c) ...@@ -16,11 +16,12 @@ function cm.initial_effect(c)
e2:SetRange(LOCATION_SZONE) e2:SetRange(LOCATION_SZONE)
e2:SetCondition(cm.descon) e2:SetCondition(cm.descon)
e2:SetTarget(cm.destg) e2:SetTarget(cm.destg)
e2:SetOperation(cm.desrepop)
e2:SetValue(cm.repval) e2:SetValue(cm.repval)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetRange(LOCATION_GRAVE+LOCATION_REMOVED) e3:SetRange(LOCATION_FZONE)
e3:SetCode(EFFECT_SEND_REPLACE) e3:SetCode(EFFECT_SEND_REPLACE)
e3:SetCondition(cm.repcon1) e3:SetCondition(cm.repcon1)
e3:SetTarget(cm.reptg1) e3:SetTarget(cm.reptg1)
...@@ -53,6 +54,7 @@ function cm.descon(e,tp,eg,ep,ev,re,r,rp) ...@@ -53,6 +54,7 @@ function cm.descon(e,tp,eg,ep,ev,re,r,rp)
end end
function cm.repfilter(c,tp) function cm.repfilter(c,tp)
return c:IsControler(tp) and c:IsLocation(LOCATION_ONFIELD) return c:IsControler(tp) and c:IsLocation(LOCATION_ONFIELD)
and c:IsReason(REASON_BATTLE+REASON_EFFECT) and not c:IsReason(REASON_REPLACE)
end end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:IsExists(cm.repfilter,1,e:GetHandler(),tp) and eg:GetCount()==1 end if chk==0 then return eg:IsExists(cm.repfilter,1,e:GetHandler(),tp) and eg:GetCount()==1 end
...@@ -62,8 +64,14 @@ function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -62,8 +64,14 @@ function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk)
return true return true
else return false end else return false end
end end
function cm.desrepop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,m)
local c=e:GetHandler()
c:SetStatus(STATUS_DESTROY_CONFIRMED,false)
Duel.Destroy(c,REASON_EFFECT+REASON_REPLACE)
end
function cm.repval(e,c) function cm.repval(e,c)
return c~=e:GetHandler() return cm.repfilter(c,e:GetHandlerPlayer())
end end
function cm.repcon1(e,tp,eg,ep,ev,re,r,rp) function cm.repcon1(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,m)==0 return Duel.GetFlagEffect(tp,m)==0
......
...@@ -125,7 +125,7 @@ function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -125,7 +125,7 @@ function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
while tc do while tc do
local te=tc:IsHasEffect(53711009,tp) local te=tc:IsHasEffect(53711009,tp)
if te then if te then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT+REASON_REPLACE) Duel.Remove(tc,POS_FACEUP,REASON_COST+REASON_REPLACE)
else else
Duel.SendtoGrave(tc,REASON_COST+REASON_DISCARD) Duel.SendtoGrave(tc,REASON_COST+REASON_DISCARD)
end end
......
...@@ -117,7 +117,7 @@ function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -117,7 +117,7 @@ function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
while tc do while tc do
local te=tc:IsHasEffect(53711009,tp) local te=tc:IsHasEffect(53711009,tp)
if te then if te then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT+REASON_REPLACE) Duel.Remove(tc,POS_FACEUP,REASON_COST+REASON_REPLACE)
else else
Duel.SendtoGrave(tc,REASON_COST+REASON_DISCARD) Duel.SendtoGrave(tc,REASON_COST+REASON_DISCARD)
end end
......
...@@ -115,7 +115,7 @@ function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -115,7 +115,7 @@ function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
while tc do while tc do
local te=tc:IsHasEffect(53711009,tp) local te=tc:IsHasEffect(53711009,tp)
if te then if te then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT+REASON_REPLACE) Duel.Remove(tc,POS_FACEUP,REASON_COST+REASON_REPLACE)
else else
Duel.SendtoGrave(tc,REASON_COST+REASON_DISCARD) Duel.SendtoGrave(tc,REASON_COST+REASON_DISCARD)
end end
......
...@@ -104,7 +104,7 @@ function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -104,7 +104,7 @@ function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
while tc do while tc do
local te=tc:IsHasEffect(53711009,tp) local te=tc:IsHasEffect(53711009,tp)
if te then if te then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT+REASON_REPLACE) Duel.Remove(tc,POS_FACEUP,REASON_COST+REASON_REPLACE)
else else
Duel.SendtoGrave(tc,REASON_COST+REASON_DISCARD) Duel.SendtoGrave(tc,REASON_COST+REASON_DISCARD)
end end
......
...@@ -35,6 +35,7 @@ function cm.initial_effect(c) ...@@ -35,6 +35,7 @@ function cm.initial_effect(c)
end end
function cm.atktg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end end
function cm.thfilter(c) function cm.thfilter(c)
return c:IsCode(m+1) and c:IsAbleToHand() return c:IsCode(m+1) and c:IsAbleToHand()
...@@ -65,6 +66,7 @@ function cm.atkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -65,6 +66,7 @@ function cm.atkop(e,tp,eg,ep,ev,re,r,rp)
end end
function cm.rectg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.rectg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetTargetPlayer(tp) Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(500) Duel.SetTargetParam(500)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,500) Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,500)
......
...@@ -35,6 +35,7 @@ function cm.initial_effect(c) ...@@ -35,6 +35,7 @@ function cm.initial_effect(c)
end end
function cm.atktg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end end
function cm.thfilter(c) function cm.thfilter(c)
return c:IsCode(m-1) and c:IsAbleToHand() return c:IsCode(m-1) and c:IsAbleToHand()
...@@ -65,6 +66,7 @@ function cm.atkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -65,6 +66,7 @@ function cm.atkop(e,tp,eg,ep,ev,re,r,rp)
end end
function cm.damtg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetTargetPlayer(1-tp) Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(500) Duel.SetTargetParam(500)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500)
......
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