Commit 895339ea authored by Huangnan's avatar Huangnan

fix

parent 75a5f322
...@@ -9,7 +9,6 @@ function s.initial_effect(c) ...@@ -9,7 +9,6 @@ function s.initial_effect(c)
s.c4a71tohand(c) s.c4a71tohand(c)
s.c4a71kang(c,s.discon,s.distg,s.disop,CATEGORY_NEGATE,12825602,1131,12825607) s.c4a71kang(c,s.discon,s.distg,s.disop,CATEGORY_NEGATE,12825602,1131,12825607)
end end
function s.c4a71kang(c,con,tg,op,category,cardcode,message,excode) function s.c4a71kang(c,con,tg,op,category,cardcode,message,excode)
local con=con local con=con
if not con then con=Chikichikibanban.c4a71kangdiscon end if not con then con=Chikichikibanban.c4a71kangdiscon end
...@@ -25,18 +24,17 @@ function s.c4a71kang(c,con,tg,op,category,cardcode,message,excode) ...@@ -25,18 +24,17 @@ function s.c4a71kang(c,con,tg,op,category,cardcode,message,excode)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(message) e1:SetDescription(message)
e1:SetCategory(CATEGORY_NEGATE) e1:SetCategory(CATEGORY_NEGATE)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING) e1:SetCode(EVENT_CHAINING)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,cardcode) e1:SetCountLimit(1,cardcode)
e1:SetCost(s.c4a71kangcost0)
e1:SetCondition(con) e1:SetCondition(con)
e1:SetTarget(tg) e1:SetTarget(tg)
e1:SetOperation(op) e1:SetOperation(op)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=e1:Clone() local e2=e1:Clone()
e2:SetCountLimit(1) e2:SetCountLimit(1,cardcode+o)
e2:SetCost(s.c4a71kangcost)
e2:SetCondition(s.c4a71kangdiscon2) e2:SetCondition(s.c4a71kangdiscon2)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--summon success --summon success
...@@ -46,16 +44,18 @@ function s.c4a71kang(c,con,tg,op,category,cardcode,message,excode) ...@@ -46,16 +44,18 @@ function s.c4a71kang(c,con,tg,op,category,cardcode,message,excode)
e3:SetOperation(Chikichikibanban.sumsuc) e3:SetOperation(Chikichikibanban.sumsuc)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function s.c4a71kangdiscon2(e,tp,eg,ep,ev,re,r,rp) function s.c4a71kangdiscon2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c:GetOverlayGroup():IsExists(Card.IsCode,1,nil,12825607) return c:GetOverlayGroup():IsExists(Card.IsCode,1,nil,12825607) and s.discon(e,tp,eg,ep,ev,re,r,rp) and Duel.GetFlagEffect(tp,id)>0
and c:GetFlagEffect(0)~=0 and s.discon(e,tp,eg,ep,ev,re,r,rp)
end end
function s.c4a71kangcost(e,tp,eg,ep,ev,re,r,rp,chk) function s.c4a71kangcost0(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) if chk==0 then return Duel.GetFlagEffect(tp,e:GetHandler():GetCode())==0 or e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
and Duel.GetFlagEffect(tp,12825602)==0 end if Duel.GetFlagEffect(tp,e:GetHandler():GetCode())==0 then
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) Duel.RegisterFlagEffect(tp,e:GetHandler():GetCode(),RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
Duel.RegisterFlagEffect(tp,12825602,RESET_PHASE+PHASE_END,0,1) else
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
end end
function s.discon(e,tp,eg,ep,ev,re,r,rp) function s.discon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and e:GetHandler():GetFlagEffect(12825612)>0 return rp==1-tp and e:GetHandler():GetFlagEffect(12825612)>0
...@@ -68,9 +68,6 @@ end ...@@ -68,9 +68,6 @@ end
function s.disop(e,tp,eg,ep,ev,re,r,rp) function s.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
Duel.NegateActivation(ev) Duel.NegateActivation(ev)
if c:GetFlagEffect(0)==0 then
c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,65)
end
end end
function s.c4a71tohand(c,tg,op,category) function s.c4a71tohand(c,tg,op,category)
local tg=tg local tg=tg
......
...@@ -20,9 +20,9 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) ...@@ -20,9 +20,9 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp)
if rc:IsRelateToEffect(re) then if rc:IsRelateToEffect(re) then
Duel.Remove(rc,POS_FACEUP,REASON_EFFECT) Duel.Remove(rc,POS_FACEUP,REASON_EFFECT)
end end
--if c:GetFlagEffect(0)==0 then if c:GetFlagEffect(0)==0 then
-- c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,65) c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,65)
--end end
end end
function s.c4a71kang(c) function s.c4a71kang(c)
...@@ -32,16 +32,15 @@ function s.c4a71kang(c) ...@@ -32,16 +32,15 @@ function s.c4a71kang(c)
e1:SetCategory(CATEGORY_REMOVE) e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING) e1:SetCode(EVENT_CHAINING)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,id) e1:SetCountLimit(1,id)
e1:SetCost(s.c4a71kangcost0)
e1:SetCondition(s.discon) e1:SetCondition(s.discon)
e1:SetTarget(s.rmtg) e1:SetTarget(s.rmtg)
e1:SetOperation(s.rmop) e1:SetOperation(s.rmop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=e1:Clone() local e2=e1:Clone()
e2:SetCountLimit(1) e2:SetCountLimit(1,id+o)
e2:SetCost(s.c4a71kangcost)
e2:SetCondition(s.c4a71kangdiscon2) e2:SetCondition(s.c4a71kangdiscon2)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--summon success --summon success
...@@ -53,17 +52,25 @@ function s.c4a71kang(c) ...@@ -53,17 +52,25 @@ function s.c4a71kang(c)
end end
function s.sumsuc(e,tp,eg,ep,ev,re,r,rp) function s.sumsuc(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:GetFlagEffect(12825612)~=0 then return end if e:GetHandler():GetFlagEffect(12825612)~=0 then return end
c:RegisterFlagEffect(12825612,RESET_PHASE+PHASE_END,0,1) c:RegisterFlagEffect(12825612,RESET_PHASE+PHASE_END,0,1)
end end
function s.discon(e,tp,eg,ep,ev,re,r,rp) function s.discon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and e:GetHandler():GetFlagEffect(12825612)>0 return rp==1-tp and e:GetHandler():GetFlagEffect(12825612)>0
and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED)
end end
function s.c4a71kangcost0(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,id)==0 or e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
if Duel.GetFlagEffect(tp,id)==0 then
Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
else
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
end
function s.c4a71kangdiscon2(e,tp,eg,ep,ev,re,r,rp) function s.c4a71kangdiscon2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c:GetOverlayGroup():IsExists(Card.IsCode,1,nil,12825608) return c:GetOverlayGroup():IsExists(Card.IsCode,1,nil,12825608)
--and c:GetFlagEffect(0)~=0 and s.discon(e,tp,eg,ep,ev,re,r,rp) and c:GetFlagEffect(0)~=0 and s.discon(e,tp,eg,ep,ev,re,r,rp) and Duel.GetFlagEffect(tp,id)>0
end end
function s.c4a71kangcost(e,tp,eg,ep,ev,re,r,rp,chk) function s.c4a71kangcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
......
...@@ -1206,7 +1206,6 @@ function Chikichikibanban.synop(e,tp,eg,ep,ev,re,r,rp,c,tuner,mg) ...@@ -1206,7 +1206,6 @@ function Chikichikibanban.synop(e,tp,eg,ep,ev,re,r,rp,c,tuner,mg)
Duel.SendtoGrave(g,REASON_MATERIAL+REASON_SYNCHRO) Duel.SendtoGrave(g,REASON_MATERIAL+REASON_SYNCHRO)
g:DeleteGroup() g:DeleteGroup()
end end
--铳影自肃(代写) --铳影自肃(代写)
function Chikichikibanban.c4a71Limit(c) function Chikichikibanban.c4a71Limit(c)
--spsummon cost --spsummon cost
...@@ -1343,16 +1342,16 @@ function Chikichikibanban.c4a71kang2(c,con,tg,op,category,cardcode,message,excod ...@@ -1343,16 +1342,16 @@ function Chikichikibanban.c4a71kang2(c,con,tg,op,category,cardcode,message,excod
e1:SetCategory(CATEGORY_NEGATE) e1:SetCategory(CATEGORY_NEGATE)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_CHAINING) e1:SetCode(EVENT_CHAINING)
e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_ACTIVATE_CONDITION)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,cardcode) e1:SetCountLimit(1,cardcode)
e1:SetCost(Chikichikibanban.c4a71kangcost0)
e1:SetCondition(con) e1:SetCondition(con)
e1:SetTarget(tg) e1:SetTarget(tg)
e1:SetOperation(op) e1:SetOperation(op)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=e1:Clone() local e2=e1:Clone()
e2:SetCountLimit(1) e2:SetCountLimit(1,cardcode+100)
e2:SetCost(Chikichikibanban.c4a71kangcost)
e2:SetCondition(Chikichikibanban.c4a71kangdiscon2(con,excode)) e2:SetCondition(Chikichikibanban.c4a71kangdiscon2(con,excode))
c:RegisterEffect(e2) c:RegisterEffect(e2)
--summon success --summon success
...@@ -1362,11 +1361,13 @@ function Chikichikibanban.c4a71kang2(c,con,tg,op,category,cardcode,message,excod ...@@ -1362,11 +1361,13 @@ function Chikichikibanban.c4a71kang2(c,con,tg,op,category,cardcode,message,excod
e3:SetOperation(Chikichikibanban.sumsuc) e3:SetOperation(Chikichikibanban.sumsuc)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function Chikichikibanban.c4a71kangcost(e,tp,eg,ep,ev,re,r,rp,chk) function Chikichikibanban.c4a71kangcost0(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) if chk==0 then return Duel.GetFlagEffect(tp,e:GetHandler():GetCode())==0 or e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
and Duel.GetFlagEffect(tp,12825602)==0 end if Duel.GetFlagEffect(tp,e:GetHandler():GetCode())==0 then
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) Duel.RegisterFlagEffect(tp,e:GetHandler():GetCode(),RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
Duel.RegisterFlagEffect(tp,12825602,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1) else
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
end end
function Chikichikibanban.sumsuc(e,tp,eg,ep,ev,re,r,rp) function Chikichikibanban.sumsuc(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -133,19 +133,22 @@ function c60152009.dfilter(c) ...@@ -133,19 +133,22 @@ function c60152009.dfilter(c)
return c:IsAttribute(ATTRIBUTE_FIRE) and c:IsReleasableByEffect() return c:IsAttribute(ATTRIBUTE_FIRE) and c:IsReleasableByEffect()
end end
function c60152009.destg(e,tp,eg,ep,ev,re,r,rp,chk) function c60152009.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroupEx(REASON_COST,tp,c60152009.dfilter,1,nil) if chk==0 then return Duel.IsExistingMatchingCard(c60152009.dfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,1,nil)
and Duel.IsExistingMatchingCard(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end and Duel.IsExistingMatchingCard(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end end
function c60152009.desop(e,tp,eg,ep,ev,re,r,rp) function c60152009.desop(e,tp,eg,ep,ev,re,r,rp)
local ct1=Duel.GetMatchingGroupCount(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) local ct1=Duel.GetMatchingGroupCount(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
local rg=Duel.SelectReleaseGroupEx(REASON_COST,tp,c60152009.dfilter,1,ct1,nil) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local ct2=Duel.Release(rg,REASON_EFFECT) local rg=Duel.SelectMatchingCard(tp,c60152009.dfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,1,ct1,nil)
if ct2==0 then return end if rg:GetCount()>0 then
Duel.BreakEffect() local ct2=Duel.Release(rg,REASON_EFFECT)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) if ct2==0 then return end
local dg=Duel.SelectMatchingCard(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,ct2,ct2,nil) Duel.BreakEffect()
Duel.HintSelection(dg) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
Duel.Destroy(dg,REASON_EFFECT) local dg=Duel.SelectMatchingCard(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,ct2,ct2,nil)
Duel.HintSelection(dg)
Duel.Destroy(dg,REASON_EFFECT)
end
end end
\ No newline at end of file
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