Commit 909f2fe3 authored by POLYMER's avatar POLYMER

fix

parent 4eaf1c1b
...@@ -65,7 +65,10 @@ function c12847003.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -65,7 +65,10 @@ function c12847003.condition(e,tp,eg,ep,ev,re,r,rp)
return false return false
end end
function c12847003.target(e,tp,eg,ep,ev,re,r,rp,chk) function c12847003.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then
local ct=Duel.GetCurrentChain()+1
return Duel.IsPlayerCanSpecialSummonMonster(tp,12847030,0,TYPES_TOKEN_MONSTER,ct*1000,ct*1000,1,RACE_PSYCHO,ATTRIBUTE_LIGHT)
end
local c=e:GetHandler() local c=e:GetHandler()
local ng=Group.CreateGroup() local ng=Group.CreateGroup()
for i=1,ev do for i=1,ev do
...@@ -77,6 +80,8 @@ function c12847003.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -77,6 +80,8 @@ function c12847003.target(e,tp,eg,ep,ev,re,r,rp,chk)
end end
end end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,ng,ng:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_NEGATE,ng,ng:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end end
function c12847003.activate(e,tp,eg,ep,ev,re,r,rp) function c12847003.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -7,7 +7,7 @@ function s.initial_effect(c) ...@@ -7,7 +7,7 @@ function s.initial_effect(c)
e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_MZONE,0) e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x3a7a)) e1:SetTarget(s.atktg)
e1:SetCondition(s.discon) e1:SetCondition(s.discon)
e1:SetValue(s.atkval) e1:SetValue(s.atkval)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -47,6 +47,9 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) ...@@ -47,6 +47,9 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_PHASE+PHASE_END,2) e1:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
end end
function s.atktg(e,c)
return c:IsSetCard(0x3a7a) and not c:IsType(TYPE_LINK)
end
function s.splimit(e,c) function s.splimit(e,c)
return not c:IsSetCard(0x3a7a) return not c:IsSetCard(0x3a7a)
end end
......
--和光同尘
local cm,m,o=GetID()
function c13000772.initial_effect(c)
c:EnableReviveLimit()
aux.AddXyzProcedureLevelFree(c,cm.check,cm.xyzcheck,2,2)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetCountLimit(1,m)
e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(cm.sprcon)
e2:SetOperation(cm.sprop)
c:RegisterEffect(e2)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetOperation(cm.drop)
c:RegisterEffect(e1)
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_XMATERIAL+EFFECT_TYPE_QUICK_O)
e3:SetCountLimit(1,m+1000)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetCost(cm.cost2)
e3:SetTarget(cm.tg2)
e3:SetOperation(cm.op2)
c:RegisterEffect(e3)
end
function cm.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function cm.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
local mc=Duel.GetMatchingGroup(nil,tp,LOCATION_MZONE,0,nil)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsXyzSummonable,tp,LOCATION_EXTRA,0,1,nil,mc) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function cm.op2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsControler(1-tp) or not c:IsRelateToEffect(e) or c:IsFacedown() then return end
local mc=Duel.GetMatchingGroup(nil,tp,LOCATION_MZONE,0,nil)
local g=Duel.GetMatchingGroup(Card.IsXyzSummonable,tp,LOCATION_EXTRA,0,nil,mc)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.XyzSummon(tp,sg:GetFirst(),nil)
end
end
function cm.check(c)
return c:GetRank()>0
end
function cm.xyzcheck(g)
return g:GetClassCount(Card.GetRank)==1
end
function cm.sprcon(e,c)
if c==nil then return true end
return Duel.CheckRemoveOverlayCard(e:GetHandlerPlayer(),1,0,2,REASON_EFFECT) and Duel.GetLocationCount(e:GetHandlerPlayer(),LOCATION_MZONE)>0
end
function cm.sprop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.RemoveOverlayCard(e:GetHandlerPlayer(),1,0,2,2,REASON_EFFECT)
end
function cm.drop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_MZONE,0,1,c,TYPE_XYZ) then
local aa=Duel.SelectMatchingCard(tp,Card.IsType,tp,LOCATION_MZONE,0,1,1,c,TYPE_XYZ):GetFirst()
Duel.Overlay(aa,c)
end
end
...@@ -47,16 +47,12 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -47,16 +47,12 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
e1:SetCode(EVENT_CHAIN_SOLVING) e1:SetCode(EVENT_CHAIN_SOLVING)
e1:SetCondition(cm.discon) e1:SetCondition(cm.discon)
e1:SetOperation(cm.disop) e1:SetOperation(cm.disop)
if Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()==PHASE_STANDBY then if Duel.GetTurnPlayer()==tp then e1:SetReset(RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,2) else e1:SetReset(RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN) end
e1:SetReset(RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,2)
else
e1:SetReset(RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN)
end
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
end end
function cm.discon(e,tp,eg,ep,ev,re,r,rp) function cm.discon(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler() local rc=re:GetHandler()
return Duel.IsExistingMatchingCard(Card.IsCode,0,LOCATION_GRAVE,LOCATION_GRAVE,1,rc,rc:GetCode()) and Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)&(LOCATION_ONFIELD+LOCATION_GRAVE)~=0 return Duel.IsExistingMatchingCard(Card.IsCode,0,LOCATION_GRAVE,LOCATION_GRAVE,1,aux.ExceptThisCard(re),rc:GetCode()) and Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)&(LOCATION_ONFIELD+LOCATION_GRAVE)~=0
end end
function cm.disop(e,tp,eg,ep,ev,re,r,rp) function cm.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev) Duel.NegateEffect(ev)
......
...@@ -51,7 +51,7 @@ function cm.mtop(e,tp,eg,ep,ev,re,r,rp) ...@@ -51,7 +51,7 @@ function cm.mtop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
Duel.ConfirmDecktop(tp,5) Duel.ConfirmDecktop(tp,5)
local g=Duel.GetDecktopGroup(tp,5) local g=Duel.GetDecktopGroup(tp,5)
local ct=g:FilterCount(Card.IsSetCard,nil,0x3620):FilterCount(Card.IsAttribute,nil,ATTRIBUTE_FIRE) local ct=g:Filter(Card.IsSetCard,nil,0x3620):FilterCount(Card.IsAttribute,nil,ATTRIBUTE_FIRE)
Duel.ShuffleDeck(tp) Duel.ShuffleDeck(tp)
if ct>1 then if ct>1 then
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
......
...@@ -17,7 +17,8 @@ function cm.initial_effect(c) ...@@ -17,7 +17,8 @@ function cm.initial_effect(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1)) e1:SetDescription(aux.Stringid(m,1))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_GRAVE) e1:SetRange(LOCATION_GRAVE)
e1:SetCountLimit(1,m+10000000) e1:SetCountLimit(1,m+10000000)
e1:SetTarget(cm.sptg) e1:SetTarget(cm.sptg)
...@@ -45,7 +46,7 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -45,7 +46,7 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp)
end end
function cm.desfilter(c) function cm.desfilter(c)
return (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and c:IsSetCard(0x3620) return c:IsSetCard(0x3620)
end end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and cm.desfilter(chkc,tp) end if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and cm.desfilter(chkc,tp) end
......
...@@ -31,7 +31,7 @@ function cm.initial_effect(c) ...@@ -31,7 +31,7 @@ function cm.initial_effect(c)
e3:SetOperation(cm.spop) e3:SetOperation(cm.spop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
local e4=e3:Clone() local e4=e3:Clone()
e4:SetCode(EVENT_TO_GRAVE) e4:SetCode(EVENT_DESTROYED)
e4:SetCondition(cm.spcon2) e4:SetCondition(cm.spcon2)
c:RegisterEffect(e4) c:RegisterEffect(e4)
...@@ -68,7 +68,7 @@ function cm.spcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -68,7 +68,7 @@ function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousLocation(LOCATION_ONFIELD)
end end
function cm.spcon2(e,tp,eg,ep,ev,re,r,rp) function cm.spcon2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_DESTROY) and e:GetHandler():IsReason(REASON_BATTLE+REASON_EFFECT) return e:GetHandler():IsReason(REASON_BATTLE+REASON_EFFECT)
end end
function cm.filter2(c) function cm.filter2(c)
return c:IsSetCard(0x3620) and c:IsRace(RACE_SPELLCASTER) and not c:IsCode(m) and c:IsAbleToHand() return c:IsSetCard(0x3620) and c:IsRace(RACE_SPELLCASTER) and not c:IsCode(m) and c:IsAbleToHand()
......
...@@ -39,7 +39,7 @@ function cm.initial_effect(c) ...@@ -39,7 +39,7 @@ function cm.initial_effect(c)
e3:SetOperation(cm.spop) e3:SetOperation(cm.spop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
local e4=e3:Clone() local e4=e3:Clone()
e4:SetCode(EVENT_TO_GRAVE) e4:SetCode(EVENT_DESTROYED)
e4:SetCondition(cm.spcon2) e4:SetCondition(cm.spcon2)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
...@@ -93,7 +93,7 @@ function cm.spcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -93,7 +93,7 @@ function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousLocation(LOCATION_ONFIELD)
end end
function cm.spcon2(e,tp,eg,ep,ev,re,r,rp) function cm.spcon2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_DESTROY) and e:GetHandler():IsReason(REASON_BATTLE+REASON_EFFECT) return e:GetHandler():IsReason(REASON_BATTLE+REASON_EFFECT)
end end
function cm.filter2(c) function cm.filter2(c)
return c:IsSetCard(0x3620) and c:IsRace(RACE_SPELLCASTER) and not c:IsCode(m) and c:IsAbleToHand() return c:IsSetCard(0x3620) and c:IsRace(RACE_SPELLCASTER) and not c:IsCode(m) and c:IsAbleToHand()
......
...@@ -42,7 +42,7 @@ function cm.initial_effect(c) ...@@ -42,7 +42,7 @@ function cm.initial_effect(c)
e3:SetOperation(cm.spop) e3:SetOperation(cm.spop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
local e4=e3:Clone() local e4=e3:Clone()
e4:SetCode(EVENT_TO_GRAVE) e4:SetCode(EVENT_DESTROYED)
e4:SetCondition(cm.spcon2) e4:SetCondition(cm.spcon2)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
...@@ -108,7 +108,7 @@ function cm.spcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -108,7 +108,7 @@ function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousLocation(LOCATION_ONFIELD)
end end
function cm.spcon2(e,tp,eg,ep,ev,re,r,rp) function cm.spcon2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_DESTROY) and e:GetHandler():IsReason(REASON_BATTLE+REASON_EFFECT) return e:GetHandler():IsReason(REASON_BATTLE+REASON_EFFECT)
end end
function cm.filter2(c) function cm.filter2(c)
return c:IsSetCard(0x3620) and c:IsRace(RACE_SPELLCASTER) and not c:IsCode(m) and c:IsAbleToHand() return c:IsSetCard(0x3620) and c:IsRace(RACE_SPELLCASTER) and not c:IsCode(m) and c:IsAbleToHand()
......
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