Commit 386d6655 authored by POLYMER's avatar POLYMER

fix

parent 8fadc287
No preview for this file type
...@@ -57,14 +57,21 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp) ...@@ -57,14 +57,21 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
Duel.Hint(HINT_CARD,0,m) Duel.Hint(HINT_CARD,0,m)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) --[[e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAINING) e1:SetCode(EVENT_CHAINING)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCondition(cm.recon) e1:SetCondition(cm.recon)
e1:SetOperation(cm.reop) e1:SetOperation(cm.reop)--]]
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_ACTIVATE_COST)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,1)
e1:SetTarget(cm.actarget2)
e1:SetOperation(cm.costop2)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
local eid=e1:GetFieldID() local eid=e1:GetFieldID()
e1:SetLabel(eid) e1:SetLabel(eid)
cm[e1]={}
local ce=nil local ce=nil
local eset={Duel.IsPlayerAffectedByEffect(tp,EFFECT_FLAG_EFFECT+11451961)} local eset={Duel.IsPlayerAffectedByEffect(tp,EFFECT_FLAG_EFFECT+11451961)}
DEFECT_ORAL_COUNT=DEFECT_ORAL_COUNT or 3 DEFECT_ORAL_COUNT=DEFECT_ORAL_COUNT or 3
...@@ -117,6 +124,38 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp) ...@@ -117,6 +124,38 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterEffect(de,tp) Duel.RegisterEffect(de,tp)
if ce then de:SetLabelObject(ce) end if ce then de:SetLabelObject(ce) end
end end
function cm.actarget2(e,te,tp)
local tc=te:GetHandler()
e:SetLabelObject(te)
return te:IsHasType(EFFECT_TYPE_ACTIVATE) and not cm[e][te]
end
function cm.costop2(e,tp,eg,ep,ev,re,r,rp)
local eset={Duel.IsPlayerAffectedByEffect(tp,EFFECT_FLAG_EFFECT+11451961)}
local res=false
for _,te in pairs(eset) do
if te:GetLabel()==e:GetLabel() then res=true break end
end
if not res then e:Reset() return false end
local c=e:GetHandler()
local te=e:GetLabelObject()
cm[e][te]=true
local tg=te:GetTarget() or aux.TRUE
local tg2=function(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return tg(e,tp,eg,ep,ev,re,r,rp,0,1) end
if chk==0 then return tg(e,tp,eg,ep,ev,re,r,rp,0) end
e:SetTarget(tg)
tg(e,tp,eg,ep,ev,re,r,rp,1)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_COUNTER)
local g=Duel.SelectMatchingCard(tp,Card.IsCanAddCounter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil,0x1972,1)
if #g>0 then
local prop1,prop2=e:GetProperty()
te:SetProperty(prop1|EFFECT_FLAG_IGNORE_IMMUNE,prop2)
g:GetFirst():AddCounter(0x1972,1)
te:SetProperty(prop1,prop2)
end
end
te:SetTarget(tg2)
end
function cm.recon(e,tp,eg,ep,ev,re,r,rp) function cm.recon(e,tp,eg,ep,ev,re,r,rp)
return re:IsHasType(EFFECT_TYPE_ACTIVATE) return re:IsHasType(EFFECT_TYPE_ACTIVATE)
end end
......
...@@ -24,11 +24,12 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -24,11 +24,12 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2)) Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2))
end end
function s.condition(e,tp,eg,ep,ev,re,r,rp) function s.condition(e,tp,eg,ep,ev,re,r,rp)
local tp=e:GetHandlerPlayer()
return (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2) and Duel.GetTurnPlayer()==tp return (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2) and Duel.GetTurnPlayer()==tp
end end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk) function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
Duel.SetChainLimit(aux.FALSE) Duel.SetChainLimit(aux.FALSE)
......
...@@ -55,13 +55,15 @@ function c12856000.op(e,tp,eg,ep,ev,re,r,rp) ...@@ -55,13 +55,15 @@ function c12856000.op(e,tp,eg,ep,ev,re,r,rp)
c:AddCounter(0xa7d,4) c:AddCounter(0xa7d,4)
end end
end end
function c12856000.w(c) function c12856000.w(c,ct)
return c:GetCounter(0xa7d)>0 and c:IsAbleToHand() return c:GetCounter(0xa7d)+ct<=12 and c:GetCounter(0xa7d)>0 and c:IsAbleToHand()
end end
function c12856000.tg2(e,tp,eg,ep,ev,re,r,rp,chk) function c12856000.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingTarget(c12856000.w,tp,4,0,1,nil) end local c=e:GetHandler()
local ct=c:GetCounter(0xa7d)
if chk==0 then return Duel.IsExistingTarget(c12856000.w,tp,4,0,1,nil,ct) and ct<12 end
Duel.Hint(3,tp,HINTMSG_RTOHAND) Duel.Hint(3,tp,HINTMSG_RTOHAND)
local tc=Duel.SelectTarget(tp,c12856000.w,tp,4,0,1,1,nil):GetFirst() local tc=Duel.SelectTarget(tp,c12856000.w,tp,4,0,1,1,nil,ct):GetFirst()
Duel.SetOperationInfo(0,CATEGORY_TOHAND,tc,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOHAND,tc,1,0,0)
local count=tc:GetCounter(0xa7d) local count=tc:GetCounter(0xa7d)
Duel.SetOperationInfo(0,CATEGORY_COUNTER,e:GetHandler(),count,0,1) Duel.SetOperationInfo(0,CATEGORY_COUNTER,e:GetHandler(),count,0,1)
...@@ -71,7 +73,9 @@ function c12856000.op2(e,tp,eg,ep,ev,re,r,rp) ...@@ -71,7 +73,9 @@ function c12856000.op2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) then
local count=tc:GetCounter(0xa7d) local count=tc:GetCounter(0xa7d)
local count1=c:GetCounter(0xa7d)
if Duel.SendtoHand(tc,nil,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_HAND) and c:IsRelateToEffect(e) then if Duel.SendtoHand(tc,nil,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_HAND) and c:IsRelateToEffect(e) then
if count+count1>12 then return end
Duel.BreakEffect() Duel.BreakEffect()
c:AddCounter(0xa7d,count) c:AddCounter(0xa7d,count)
end end
......
...@@ -26,16 +26,16 @@ function c22348435.initial_effect(c) ...@@ -26,16 +26,16 @@ function c22348435.initial_effect(c)
end end
c22348435.has_text_type=TYPE_UNION c22348435.has_text_type=TYPE_UNION
function c22348435.beqfilter(c,tp) function c22348435.beqfilter(c,tp)
return c:IsFaceup() and c:IsSummonPlayer(1-tp) return c:IsFaceup() --and c:IsSummonPlayer(1-tp)
end end
function c22348435.eqfilter(c) function c22348435.eqfilter(c,e,tp)
return c:IsSetCard(0x970b) and c:IsType(TYPE_MONSTER) and not c:IsForbidden() and Duel.IsExistingMatchingCard(c22348435.eqfilter2,c:GetControler(),LOCATION_GRAVE,0,1,c) return c:IsSetCard(0x970b) and c:IsType(TYPE_MONSTER) and not c:IsForbidden() and Duel.IsExistingMatchingCard(c22348435.eqfilter2,tp,LOCATION_GRAVE,0,1,c)
end end
function c22348435.eqfilter2(c) function c22348435.eqfilter2(c)
return c:IsSetCard(0x970b) and c:IsAbleToDeck() return c:IsSetCard(0x970b) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck()
end end
function c22348435.eqtg(e,tp,eg,ep,ev,re,r,rp,chk) function c22348435.eqtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:IsExists(c22348435.beqfilter,1,nil,tp) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.IsExistingMatchingCard(c22348435.eqfilter,tp,LOCATION_GRAVE,0,1,nil) end if chk==0 then return eg:IsExists(c22348435.beqfilter,1,nil,tp) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.IsExistingMatchingCard(c22348435.eqfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetTargetCard(eg) Duel.SetTargetCard(eg)
local g=eg:Filter(c22348435.beqfilter,nil,tp) local g=eg:Filter(c22348435.beqfilter,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,0,1,0,0) Duel.SetOperationInfo(0,CATEGORY_EQUIP,0,1,0,0)
...@@ -50,8 +50,8 @@ end ...@@ -50,8 +50,8 @@ end
function c22348435.eqop(e,tp,eg,ep,ev,re,r,rp) function c22348435.eqop(e,tp,eg,ep,ev,re,r,rp)
local g=eg:Filter(c22348435.filter2,nil,e,tp) local g=eg:Filter(c22348435.filter2,nil,e,tp)
local ft=Duel.GetLocationCount(tp,LOCATION_SZONE) local ft=Duel.GetLocationCount(tp,LOCATION_SZONE)
local ctg=Duel.GetMatchingGroup(c22348435.eqfilter,tp,LOCATION_GRAVE,0,nil) local ctg=Duel.GetMatchingGroup(c22348435.eqfilter,tp,LOCATION_GRAVE,0,nil,e,tp)
local ct=Duel.GetMatchingGroup(c22348435.eqfilter,tp,LOCATION_GRAVE,0,nil):GetCount() local ct=Duel.GetMatchingGroup(c22348435.eqfilter,tp,LOCATION_GRAVE,0,nil,e,tp):GetCount()
local tc=g:GetFirst() local tc=g:GetFirst()
if not tc or ft<1 or ct<1 then return end if not tc or ft<1 or ct<1 then return end
if g:GetCount()>1 then if g:GetCount()>1 then
......
...@@ -14,16 +14,16 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -14,16 +14,16 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.SetLP(1-tp,Duel.GetLP(1-tp)*4) Duel.SetLP(1-tp,Duel.GetLP(1-tp)*4)
local t2=Duel.IsPlayerCanDraw(tp) local t2=Duel.IsPlayerCanDraw(tp)
local op=0 local op=0
local m={} local b={}
local n={} local n={}
local ct=1 local ct=1
m[ct]=aux.Stringid(m,0) n[ct]=1 ct=ct+1 b[ct]=aux.Stringid(m,0) n[ct]=1 ct=ct+1
if t2 then m[ct]=aux.Stringid(m,1) n[ct]=2 ct=ct+1 end if t2 then b[ct]=aux.Stringid(m,1) n[ct]=2 ct=ct+1 end
local sp=Duel.SelectOption(1-tp,table.unpack(m)) local sp=Duel.SelectOption(1-tp,table.unpack(b))
op=n[sp+1] op=n[sp+1]
Duel.BreakEffect() Duel.BreakEffect()
if op==1 then if op==1 then
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CHANGE_DAMAGE) e1:SetCode(EFFECT_CHANGE_DAMAGE)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
......
...@@ -54,7 +54,6 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -54,7 +54,6 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
local pc=1 local pc=1
for i=1,12 do if lvt[i] then lvt[i]=nil lvt[pc]=i pc=pc+1 end end for i=1,12 do if lvt[i] then lvt[i]=nil lvt[pc]=i pc=pc+1 end end
lvt[pc]=nil
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,1)) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,1))
local lv=Duel.AnnounceNumber(tp,table.unpack(lvt)) local lv=Duel.AnnounceNumber(tp,table.unpack(lvt))
local rg=cg:SelectSubGroup(tp,aux.dlvcheck,false,lv,lv) local rg=cg:SelectSubGroup(tp,aux.dlvcheck,false,lv,lv)
......
...@@ -49,6 +49,16 @@ function c98500323.initial_effect(c) ...@@ -49,6 +49,16 @@ function c98500323.initial_effect(c)
e4:SetValue(1) e4:SetValue(1)
c:RegisterEffect(e4) c:RegisterEffect(e4)
--token --token
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(98500323,2))
e5:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetRange(LOCATION_MZONE)
e5:SetCountLimit(1,98550023)
e5:SetTarget(c98500323.xsptg)
e5:SetOperation(c98500323.xspop)
c:RegisterEffect(e5)
--tohand
local e9=Effect.CreateEffect(c) local e9=Effect.CreateEffect(c)
e9:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e9:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e9:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e9:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
...@@ -160,22 +170,34 @@ function c98500323.xspop(e,tp,eg,ep,ev,re,r,rp) ...@@ -160,22 +170,34 @@ function c98500323.xspop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end
local token=Duel.CreateToken(tp,98500325) local token=Duel.CreateToken(tp,98500325)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)
local e2=Effect.CreateEffect(e:GetHandler()) local e4=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE) e4:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL+EFFECT_CANNOT_BE_LINK_MATERIAL+EFFECT_CANNOT_BE_SYNCHRO_MATERIAL) e4:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
e2:SetReset(RESET_EVENT+RESETS_STANDARD) e4:SetValue(1)
e2:SetValue(1) e4:SetReset(RESET_EVENT+RESETS_STANDARD)
token:RegisterEffect(e2,true) token:RegisterEffect(e4,true)
local e5=e4:Clone()
e5:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
token:RegisterEffect(e5,true)
local e6=e5:Clone()
e6:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
token:RegisterEffect(e6,true)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(98500323,5)) then if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(98500323,5)) then
local token=Duel.CreateToken(tp,98500325) local token=Duel.CreateToken(tp,98500325)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL+EFFECT_CANNOT_BE_LINK_MATERIAL+EFFECT_CANNOT_BE_SYNCHRO_MATERIAL) e1:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetValue(1)
e1:SetValue(1) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
token:RegisterEffect(e1,true) token:RegisterEffect(e1,true)
end local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
token:RegisterEffect(e2,true)
local e3=e2:Clone()
e3:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
token:RegisterEffect(e3,true)
end
end end
function c98500323.rmcon(e,tp,eg,ep,ev,re,r,rp) function c98500323.rmcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(98501323)==0 return e:GetHandler():GetFlagEffect(98501323)==0
......
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