Commit 895339ea authored by Huangnan's avatar Huangnan

fix

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