Commit 3b60e64a authored by POLYMER's avatar POLYMER

fix

parent b90f2319
...@@ -35,9 +35,9 @@ function cm.initial_effect(c) ...@@ -35,9 +35,9 @@ function cm.initial_effect(c)
if not PNFL_IMMUNE_CHECK then if not PNFL_IMMUNE_CHECK then
PNFL_IMMUNE_CHECK=true PNFL_IMMUNE_CHECK=true
local _IsImmuneToEffect=Card.IsImmuneToEffect local _IsImmuneToEffect=Card.IsImmuneToEffect
function Card.IsImmuneToEffect(c,e,...) function Card.IsImmuneToEffect(c,...)
c:RegisterFlagEffect(11451965,RESET_EVENT+RESETS_STANDARD+RESET_CHAIN,0,1) c:RegisterFlagEffect(11451965,RESET_EVENT+RESETS_STANDARD+RESET_CHAIN,0,1)
local res=_IsImmuneToEffect(c,e,...) local res=_IsImmuneToEffect(c,...)
c:ResetFlagEffect(11451965) c:ResetFlagEffect(11451965)
return res return res
end end
...@@ -206,6 +206,7 @@ function cm.drtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -206,6 +206,7 @@ function cm.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return true end if chk==0 then return true end
if c:IsLocation(LOCATION_GRAVE) then Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,c,1,0,0) end if c:IsLocation(LOCATION_GRAVE) then Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,c,1,0,0) end
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end end
function cm.drop(e,tp,eg,ep,ev,re,r,rp) function cm.drop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -179,7 +179,7 @@ function cm.chop(e,tp,eg,ep,ev,re,r,rp) ...@@ -179,7 +179,7 @@ function cm.chop(e,tp,eg,ep,ev,re,r,rp)
end end
function cm.repop(e,tp,eg,ep,ev,re,r,rp) function cm.repop(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp local chkf=tp
local mg1=Duel.GetMatchingGroup(cm.filter1,tp,LOCATION_ONFIELD,0,nil) local mg1=Duel.GetMatchingGroup(cm.filter1,tp,LOCATION_ONFIELD,0,nil,e)
local sg1=Duel.GetMatchingGroup(cm.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf) local sg1=Duel.GetMatchingGroup(cm.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg2=nil local mg2=nil
local sg2=nil local sg2=nil
......
...@@ -15,6 +15,7 @@ function s.initial_effect(c) ...@@ -15,6 +15,7 @@ function s.initial_effect(c)
local e2=e1:Clone() local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2) c:RegisterEffect(e2)
e1:SetLabelObject(e2)
--special summon --special summon
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,2)) e3:SetDescription(aux.Stringid(id,2))
...@@ -83,7 +84,7 @@ function s.coop(e,tp,eg,ep,ev,re,r,rp) ...@@ -83,7 +84,7 @@ function s.coop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function s.spcon(e,tp,eg,ep,ev,re,r,rp) function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return re~=e:GetLabelObject() return re~=e:GetLabelObject() and re~=e:GetLabelObject():GetLabelObject()
end end
function s.filter(c,e,tp) function s.filter(c,e,tp)
return c:IsCode(12866670) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 return c:IsCode(12866670) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
......
...@@ -2,13 +2,14 @@ ...@@ -2,13 +2,14 @@
local cm,m,o=GetID() local cm,m,o=GetID()
function cm.initial_effect(c) function cm.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
aux.AddCodeList(c,m)
--cannot special summon --cannot special summon
local e1=Effect.CreateEffect(c) local e0=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e0:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION) e0:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.FALSE) e0:SetValue(aux.FALSE)
c:RegisterEffect(e1) c:RegisterEffect(e0)
--special summon --special summon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,2)) e1:SetDescription(aux.Stringid(m,2))
...@@ -16,56 +17,51 @@ function cm.initial_effect(c) ...@@ -16,56 +17,51 @@ function cm.initial_effect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_DAMAGE) e1:SetCode(EVENT_DAMAGE)
--e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END) --e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e1:SetRange(LOCATION_HAND) e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetCountLimit(1,EFFECT_COUNT_CODE_CHAIN)
e1:SetCondition(cm.spcon) e1:SetCondition(cm.spcon)
e1:SetTarget(cm.sptg) e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop) e1:SetOperation(cm.spop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,m)
c:RegisterEffect(e2)
--to hand --to hand
local e1=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0)) e2:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_GRAVE_ACTION+CATEGORY_LEAVE_GRAVE) e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_GRAVE_ACTION+CATEGORY_LEAVE_GRAVE)
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetTarget(cm.thtg) e2:SetTarget(cm.thtg)
e1:SetOperation(cm.thop) e2:SetOperation(cm.thop)
c:RegisterEffect(e1) c:RegisterEffect(e2)
--immune --immune
local e1=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e3:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT) e3:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.immcon) e3:SetCondition(cm.immcon)
e1:SetValue(cm.immval) e3:SetValue(cm.immval)
c:RegisterEffect(e1) c:RegisterEffect(e3)
local e0=e1:Clone() local e4=e3:Clone()
e0:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e4:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
c:RegisterEffect(e0) c:RegisterEffect(e4)
local e9=Effect.CreateEffect(c) local e5=Effect.CreateEffect(c)
e9:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e9:SetCode(EVENT_ADJUST) e5:SetCode(EVENT_ADJUST)
e9:SetRange(LOCATION_MZONE) e5:SetRange(LOCATION_MZONE)
e9:SetOperation(cm.desop) e5:SetOperation(cm.desop)
c:RegisterEffect(e9) c:RegisterEffect(e5)
--control --control
local e2=Effect.CreateEffect(c) local e6=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_RECOVER) e6:SetCategory(CATEGORY_RECOVER)
e2:SetDescription(aux.Stringid(m,2)) e6:SetDescription(aux.Stringid(m,2))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_LEAVE_FIELD) e6:SetCode(EVENT_LEAVE_FIELD)
e2:SetCondition(cm.condition) e6:SetCondition(cm.condition)
e2:SetTarget(cm.target) e6:SetTarget(cm.target)
e2:SetOperation(cm.operation) e6:SetOperation(cm.operation)
c:RegisterEffect(e2) c:RegisterEffect(e6)
end end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp) function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return ep==e:GetHandler():GetOwner() return ep==e:GetHandler():GetOwner()
...@@ -80,12 +76,14 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -80,12 +76,14 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end end
function cm.spop(e,tp,eg,ep,ev,re,r,rp) function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():GetLocation()==LOCATION_HAND then i=1 else i=2 end local c=e:GetHandler()
if not Duel.SelectYesNo(tp,aux.Stringid(m,i)) then return end local i=e:GetHandler():GetLocation()==LOCATION_HAND and 1 or 2
if Duel.GetFlagEffect(tp,m+i)~=0 or not Duel.SelectYesNo(tp,aux.Stringid(m,i)) then return end
Duel.RegisterFlagEffect(tp,m+i,RESET_PHASE+PHASE_END,0,1)
local c=e:GetHandler() local c=e:GetHandler()
if Duel.SpecialSummon(c,0,tp,tp,true,true,POS_FACEUP)~=0 then c:CompleteProcedure() end if Duel.SpecialSummon(c,0,tp,tp,true,true,POS_FACEUP)~=0 then c:CompleteProcedure() end
local i=math.random(3,8) local desc=math.random(3,8)
Duel.Hint(24,0,aux.Stringid(60000032,i)) Duel.Hint(24,0,aux.Stringid(60000032,desc))
end end
function cm.thfilter(c) function cm.thfilter(c)
return aux.IsCodeListed(c,60000032) and c:IsAbleToHand() return aux.IsCodeListed(c,60000032) 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