Commit 30b034a5 authored by Nemo Ma's avatar Nemo Ma

fix

parent c7893946
--卡通风暴密码人 --卡通风暴密码人
function c250000000.initial_effect(c) function c250000000.initial_effect(c)
aux.AddCodeList(c,15259703) aux.AddCodeList(c,15259703)
c:EnableReviveLimit()
--special summon --special summon
--destroy --destroy
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
...@@ -95,12 +94,6 @@ end ...@@ -95,12 +94,6 @@ end
function c250000000.atlimit(e,c) function c250000000.atlimit(e,c)
return not c:IsType(TYPE_TOON) or c:IsFacedown() return not c:IsType(TYPE_TOON) or c:IsFacedown()
end end
function c250000000.atklimit(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e:GetHandler():RegisterEffect(e1)
end
This diff is collapsed.
...@@ -37,6 +37,7 @@ function cm.initial_effect(c) ...@@ -37,6 +37,7 @@ function cm.initial_effect(c)
e3:SetType(EFFECT_TYPE_SINGLE) e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_PZONE) e3:SetRange(LOCATION_PZONE)
e3:SetCountLimit(1,m)
e3:SetCondition(cm.ArcKnightPCardCheck) e3:SetCondition(cm.ArcKnightPCardCheck)
e3:SetCode(29036036) e3:SetCode(29036036)
e3:SetValue(function() return LOCATION_DECK,cm.ArcKnightPCardFilter,1 end ) e3:SetValue(function() return LOCATION_DECK,cm.ArcKnightPCardFilter,1 end )
...@@ -85,8 +86,7 @@ function cm.ctlop(e,tp,eg,ep,ev,re,r,rp) ...@@ -85,8 +86,7 @@ function cm.ctlop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetControl(c,1-tp,PHASE_END,2) then if Duel.GetControl(c,1-tp,PHASE_END,2) then
local g = Duel.GetMatchingGroup(cm.tgfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp,c:GetSequence()) local g = Duel.GetMatchingGroup(cm.tgfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp,c:GetSequence())
if g:GetCount()>0 then if g:GetCount()>0 then
local og = Duel.GetOperatedGroup() for tc in aux.Next(g) do
for tc in aux.Next(og) do
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE) e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_CANNOT_TRIGGER) e3:SetCode(EFFECT_CANNOT_TRIGGER)
......
...@@ -113,12 +113,12 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -113,12 +113,12 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.DiscardHand(tp,Card.IsDiscardable,2,2,REASON_COST+REASON_DISCARD) Duel.DiscardHand(tp,Card.IsDiscardable,2,2,REASON_COST+REASON_DISCARD)
end end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,0,LOCATION_MZONE,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,PLAYER_ALL,LOCATION_MZONE) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,1-tp,LOCATION_MZONE)
end end
function cm.op(e,tp,eg,ep,ev,re,r,rp) function cm.op(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGrave,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGrave,tp,0,LOCATION_MZONE,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.HintSelection(g) Duel.HintSelection(g)
Duel.SendtoGrave(g,REASON_EFFECT) Duel.SendtoGrave(g,REASON_EFFECT)
......
...@@ -38,6 +38,7 @@ function c98920088.initial_effect(c) ...@@ -38,6 +38,7 @@ function c98920088.initial_effect(c)
e1:SetOperation(c98920088.disop) e1:SetOperation(c98920088.disop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
aux.xyz_number[98920088]=55
function c98920088.indtg(e,c) function c98920088.indtg(e,c)
return c:IsDefensePos() return c:IsDefensePos()
end end
......
...@@ -29,6 +29,7 @@ function c98920550.initial_effect(c) ...@@ -29,6 +29,7 @@ function c98920550.initial_effect(c)
e3:SetOperation(c98920550.disop) e3:SetOperation(c98920550.disop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
aux.xyz_number[98920550]=39
function c98920550.ovfilter(c) function c98920550.ovfilter(c)
local rk=c:GetRank() local rk=c:GetRank()
return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsCode(52653092,56832966,86532744,56840427) return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsCode(52653092,56832966,86532744,56840427)
......
...@@ -93,7 +93,7 @@ function c98940010.operation2(e,tp,eg,ep,ev,re,r,rp) ...@@ -93,7 +93,7 @@ function c98940010.operation2(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c98940010.sumlimit(e,c,se,sump,sumtype,sumpos,targetp) function c98940010.sumlimit(e,c,se,sump,sumtype,sumpos,targetp)
return se and se:GetHandler():IsCode(98940010) and c:IsCode(e:GetLabel()) return c:IsCode(e:GetLabel())
end end
function c98940010.sumlimit1(e,c) function c98940010.sumlimit1(e,c)
return c:IsCode(e:GetLabel()) return c:IsCode(e:GetLabel())
......
...@@ -65,7 +65,7 @@ function c9910811.racop(e,tp,eg,ep,ev,re,r,rp) ...@@ -65,7 +65,7 @@ function c9910811.racop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CHANGE_RACE) e1:SetCode(EFFECT_CHANGE_RACE)
e1:SetTargetRange(OCATION_MZONE,LOCATION_MZONE) e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e1:SetValue(e:GetLabel()) e1:SetValue(e:GetLabel())
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
......
...@@ -35,7 +35,7 @@ function c9910894.initial_effect(c) ...@@ -35,7 +35,7 @@ function c9910894.initial_effect(c)
c:RegisterEffect(e4) c:RegisterEffect(e4)
--destroy --destroy
local e5=Effect.CreateEffect(c) local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_DESTROY+CATEGORY_REMOVE+CATEGORY_COUNTER) e5:SetCategory(CATEGORY_TOHAND+CATEGORY_COUNTER)
e5:SetType(EFFECT_TYPE_IGNITION) e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetProperty(EFFECT_FLAG_CARD_TARGET) e5:SetProperty(EFFECT_FLAG_CARD_TARGET)
e5:SetRange(LOCATION_MZONE) e5:SetRange(LOCATION_MZONE)
...@@ -57,16 +57,37 @@ end ...@@ -57,16 +57,37 @@ end
function c9910894.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c9910894.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local g=Duel.GetMatchingGroup(c9910894.tdfilter,tp,LOCATION_REMOVED,LOCATION_REMOVED,nil) local g=Duel.GetMatchingGroup(c9910894.tdfilter,tp,LOCATION_REMOVED,LOCATION_REMOVED,nil)
if chkc then return false end if chkc then return false end
if chk==0 then return g:CheckSubGroup(aux.drccheck,2,2) end if chk==0 then return #g>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sg=g:SelectSubGroup(tp,aux.drccheck,false,2,4) local sg=g:SelectSubGroup(tp,aux.drccheck,false,1,4)
Duel.SetTargetCard(sg) Duel.SetTargetCard(sg)
Duel.SetOperationInfo(0,CATEGORY_TODECK,sg,sg:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_TODECK,sg,sg:GetCount(),0,0)
end end
function c9910894.posfilter(c)
return c:IsFaceup() and c:IsCanTurnSet()
end
function c9910894.tdop(e,tp,eg,ep,ev,re,r,rp) function c9910894.tdop(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if tg:GetCount()<=0 then return end if tg:GetCount()>0 then
Duel.SendtoDeck(tg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) local ct=Duel.SendtoDeck(tg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
local g=Duel.GetOperatedGroup()
if g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.ShuffleDeck(tp) end
local b1=ct==2 and Duel.IsExistingMatchingCard(c9910894.posfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
local b2=ct==3 and Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_DECK,0,1,nil,TYPE_MONSTER)
local b3=ct==4 and Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>1
if (b1 or b2 or b3) and Duel.SelectYesNo(tp,aux.Stringid(14001209,1)) then
if b1 then
local pg=Duel.GetMatchingGroup(c9910894.posfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
Duel.ChangePosition(pg,POS_FACEDOWN_DEFENSE)
elseif b2 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local dg=Duel.SelectMatchingCard(tp,Card.IsType,tp,LOCATION_DECK,0,1,1,nil,TYPE_MONSTER)
Duel.Destroy(dg,REASON_EFFECT)
else
Duel.DiscardHand(1-tp,nil,2,2,REASON_EFFECT+REASON_DISCARD)
end
end
end
end end
function c9910894.cfilter(c) function c9910894.cfilter(c)
return c:IsFaceup() and c:IsType(TYPE_SPELL+TYPE_TRAP) return c:IsFaceup() and c:IsType(TYPE_SPELL+TYPE_TRAP)
...@@ -90,18 +111,19 @@ function c9910894.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -90,18 +111,19 @@ function c9910894.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.RemoveCounter(tp,1,0,0x1,3,REASON_COST) Duel.RemoveCounter(tp,1,0,0x1,3,REASON_COST)
end end
function c9910894.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c9910894.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsAbleToRemove() end if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsAbleToHand() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,nil) if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,nil)
and Duel.IsCanAddCounter(tp,0x1,1,e:GetHandler()) end and Duel.IsCanAddCounter(tp,0x1,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,1,nil) local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,1,0,0x1)
end end
function c9910894.operation(e,tp,eg,ep,ev,re,r,rp) function c9910894.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT,LOCATION_REMOVED)~=0 and c:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) and Duel.SendtoHand(tc,nil,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_HAND)
and c:IsRelateToEffect(e) then
Duel.BreakEffect() Duel.BreakEffect()
c:AddCounter(0x1,1) c:AddCounter(0x1,1)
end 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