Commit 8d141b1a authored by Nemo Ma's avatar Nemo Ma

fix + iflist

parent c3440248
...@@ -748,13 +748,24 @@ ...@@ -748,13 +748,24 @@
30002065 0 30002065 0
30010000 0 30010000 0
30012000 0 30012000 0
#220501
12057603 0
22520006 0
35300319 0
64800025 0
65010020 0
9300012 1
12057607 1
14000210 1
15000071 1
35300209 1
35399009 1
82204231 1
82207032 2
#220417 #220417
14010111 0 14010111 0
12057810 0
22520010 0 22520010 0
22520006 1
3000070 2 3000070 2
#220410 #220410
33330512 0 33330512 0
33701317 0 33701317 0
...@@ -762,12 +773,10 @@ ...@@ -762,12 +773,10 @@
14050005 1 14050005 1
22070090 1 22070090 1
9910717 2 9910717 2
35399009 2
67210000 2 67210000 2
#220327 #220327
12057601 0 12057601 0
12057606 0 12057606 0
12057607 0
15000682 0 15000682 0
33300200 0 33300200 0
35300191 0 35300191 0
...@@ -1400,7 +1409,6 @@ ...@@ -1400,7 +1409,6 @@
#35399007 0 #35399007 0
#35399015 0 #35399015 0
#35399003 0 #35399003 0
35399005 0
#35399016 0 #35399016 0
22060140 0 22060140 0
31407001 0 31407001 0
...@@ -1446,7 +1454,6 @@ ...@@ -1446,7 +1454,6 @@
14090042 0 14090042 0
31400001 0 31400001 0
22060180 1 22060180 1
65010020 1
#210919 #210919
33403520 0 33403520 0
33403521 0 33403521 0
...@@ -1599,7 +1606,6 @@ ...@@ -1599,7 +1606,6 @@
63790300 0 63790300 0
63790500 0 63790500 0
63790501 0 63790501 0
14010111 1
15000182 2 15000182 2
30005000 2 30005000 2
#210509 #210509
......
...@@ -48,6 +48,7 @@ function cm.costchk(e,te,tp) ...@@ -48,6 +48,7 @@ function cm.costchk(e,te,tp)
return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,3,nil) return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,3,nil)
end end
function cm.actarget(e,te,tp) function cm.actarget(e,te,tp)
e:SetLabelObject(te)
return te:GetHandler()==e:GetHandler() return te:GetHandler()==e:GetHandler()
end end
function cm.costop(e,tp,eg,ep,ev,re,r,rp) function cm.costop(e,tp,eg,ep,ev,re,r,rp)
...@@ -58,6 +59,7 @@ function cm.costop(e,tp,eg,ep,ev,re,r,rp) ...@@ -58,6 +59,7 @@ function cm.costop(e,tp,eg,ep,ev,re,r,rp)
c:SetMaterial(g) c:SetMaterial(g)
Duel.SendtoDeck(g,nil,2,REASON_COST+REASON_MATERIAL) Duel.SendtoDeck(g,nil,2,REASON_COST+REASON_MATERIAL)
Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,false) Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,false)
e:GetHandler():CreateEffectRelation(te)
end end
function cm.spfilter(c,e,tp) function cm.spfilter(c,e,tp)
return c:IsCode(11451406) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsCode(11451406) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
...@@ -34,10 +34,12 @@ function cm.initial_effect(c) ...@@ -34,10 +34,12 @@ function cm.initial_effect(c)
c:RegisterEffect(e5) c:RegisterEffect(e5)
end end
function cm.actarget(e,te,tp) function cm.actarget(e,te,tp)
e:SetLabelObject(te)
return te:GetHandler()==e:GetHandler() return te:GetHandler()==e:GetHandler()
end end
function cm.costop(e,tp,eg,ep,ev,re,r,rp) function cm.costop(e,tp,eg,ep,ev,re,r,rp)
Duel.MoveToField(e:GetHandler(),tp,tp,LOCATION_SZONE,POS_FACEUP,false) Duel.MoveToField(e:GetHandler(),tp,tp,LOCATION_SZONE,POS_FACEUP,false)
e:GetHandler():CreateEffectRelation(te)
end end
function cm.chkop(e,tp,eg,ep,ev,re,r,rp,chk) function cm.chkop(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -70,7 +72,9 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -70,7 +72,9 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local max=g:GetClassCount(Card.GetAttribute) local max=g:GetClassCount(Card.GetAttribute)
local ft=Duel.GetLocationCount(tp,LOCATION_SZONE) local ft=Duel.GetLocationCount(tp,LOCATION_SZONE)
local sg=g:SelectSubGroup(tp,aux.dabcheck,false,1,math.min(max,ft)) aux.GCheckAdditional=aux.dabcheck
local sg=g:SelectSubGroup(tp,aux.TRUE,false,1,math.min(max,ft))
aux.GCheckAdditional=nil
if not sg or #sg==0 then return end if not sg or #sg==0 then return end
for tc in aux.Next(sg) do for tc in aux.Next(sg) do
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
......
...@@ -50,7 +50,9 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -50,7 +50,9 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Release(e:GetHandler(),REASON_COST) Duel.Release(e:GetHandler(),REASON_COST)
end end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil) and (Duel.GetLocationCount(tp,LOCATION_SZONE)>0 or e:IsHasType(EFFECT_TYPE_QUICK_O)) end local ft=0
if not e:GetHandler():IsLocation(LOCATION_SZONE) then ft=1 end
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil) and (Duel.GetLocationCount(tp,LOCATION_SZONE)>ft or e:IsHasType(EFFECT_TYPE_QUICK_O)) end
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
...@@ -91,6 +93,12 @@ function cm.chop(e,tp,eg,ep,ev,re,r,rp) ...@@ -91,6 +93,12 @@ function cm.chop(e,tp,eg,ep,ev,re,r,rp)
op(e,tp,eg,ep,ev,re,r,rp) op(e,tp,eg,ep,ev,re,r,rp)
if Duel.SelectYesNo(tp,aux.Stringid(m,0)) then Duel.NegateActivation(ev) end if Duel.SelectYesNo(tp,aux.Stringid(m,0)) then Duel.NegateActivation(ev) end
end end
if re:GetHandler():GetOriginalCode()==11451510 then
repop=function(e,tp,eg,ep,ev,re,r,rp)
if Duel.SelectYesNo(tp,aux.Stringid(m,0)) then Duel.NegateActivation(ev) end
op(e,tp,eg,ep,ev,re,r,rp)
end
end
re:SetOperation(repop) re:SetOperation(repop)
if not re:IsHasCategory(CATEGORY_NEGATE) then re:SetCategory(re:GetCategory()+CATEGORY_NEGATE) end if not re:IsHasCategory(CATEGORY_NEGATE) then re:SetCategory(re:GetCategory()+CATEGORY_NEGATE) end
re:SetLabel(re:GetLabel()|0x1) re:SetLabel(re:GetLabel()|0x1)
......
...@@ -41,7 +41,6 @@ function cm.setfilter(c) ...@@ -41,7 +41,6 @@ function cm.setfilter(c)
return c:GetType()&0x100004==0x100004 and c:IsSSetable() return c:GetType()&0x100004==0x100004 and c:IsSSetable()
end end
function cm.condition(e,tp,eg,ep,ev,re,r,rp) function cm.condition(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) then return false end
return re:IsHasCategory(CATEGORY_SEARCH) or re:IsHasCategory(CATEGORY_TOHAND) or re:IsHasCategory(CATEGORY_DRAW) return re:IsHasCategory(CATEGORY_SEARCH) or re:IsHasCategory(CATEGORY_TOHAND) or re:IsHasCategory(CATEGORY_DRAW)
end end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
...@@ -49,7 +48,9 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -49,7 +48,9 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Release(e:GetHandler(),REASON_COST) Duel.Release(e:GetHandler(),REASON_COST)
end end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.setfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) and (Duel.GetLocationCount(tp,LOCATION_SZONE)>0 or e:IsHasType(EFFECT_TYPE_QUICK_O)) end local ft=0
if not e:GetHandler():IsLocation(LOCATION_SZONE) then ft=1 end
if chk==0 then return Duel.IsExistingMatchingCard(cm.setfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) and (Duel.GetLocationCount(tp,LOCATION_SZONE)>ft or e:IsHasType(EFFECT_TYPE_QUICK_O)) end
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
...@@ -98,6 +99,16 @@ function cm.chop(e,tp,eg,ep,ev,re,r,rp) ...@@ -98,6 +99,16 @@ function cm.chop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(sg,REASON_EFFECT+REASON_DISCARD) Duel.SendtoGrave(sg,REASON_EFFECT+REASON_DISCARD)
end end
end end
if re:GetHandler():GetOriginalCode()==11451510 then
repop=function(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
local sg=g:RandomSelect(1-tp,1)
Duel.SendtoGrave(sg,REASON_EFFECT+REASON_DISCARD)
end
op(e,tp,eg,ep,ev,re,r,rp)
end
end
re:SetOperation(repop) re:SetOperation(repop)
if not re:IsHasCategory(CATEGORY_HANDES) then re:SetCategory(re:GetCategory()+CATEGORY_HANDES) end if not re:IsHasCategory(CATEGORY_HANDES) then re:SetCategory(re:GetCategory()+CATEGORY_HANDES) end
re:SetLabel(re:GetLabel()|0x8) re:SetLabel(re:GetLabel()|0x8)
......
...@@ -47,6 +47,7 @@ function cm.costop(e,tp,eg,ep,ev,re,r,rp) ...@@ -47,6 +47,7 @@ function cm.costop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local te=e:GetLabelObject() local te=e:GetLabelObject()
Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,false) Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,false)
e:GetHandler():CreateEffectRelation(te)
c:CancelToGrave(false) c:CancelToGrave(false)
te:SetType(EFFECT_TYPE_ACTIVATE) te:SetType(EFFECT_TYPE_ACTIVATE)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
......
...@@ -52,8 +52,14 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -52,8 +52,14 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
reg(sc,se,bool) reg(sc,se,bool)
end end
for tc in aux.Next(g) do for tc in aux.Next(g) do
if tc.initial_effect then if tc.initial_effect and tc:GetOriginalType()&TYPE_NORMAL==0 then
tc:ReplaceEffect(tc:GetOriginalCode(),0) tc:ReplaceEffect(tc:GetOriginalCode(),0)
elseif tc.initial_effect then
local ini=cm.initial_effect
cm.initial_effect=function() end
tc:ReplaceEffect(m,0)
cm.initial_effect=ini
tc.initial_effect(tc)
end end
end end
Card.RegisterEffect=reg Card.RegisterEffect=reg
......
...@@ -45,7 +45,7 @@ function cm.atkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -45,7 +45,7 @@ function cm.atkop(e,tp,eg,ep,ev,re,r,rp)
c:RegisterEffect(e2) c:RegisterEffect(e2)
c:RegisterFlagEffect(m+10000,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) c:RegisterFlagEffect(m+10000,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end end
c:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,2) c:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD-RESET_TEMP_REMOVE-RESET_TURN_SET+RESET_PHASE+PHASE_END,0,2)
end end
function cm.negcon(e,tp,eg,ep,ev,re,r,rp) function cm.negcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and rp~=tp and Duel.IsChainNegatable(ev) and e:GetHandler():GetFlagEffect(m+10000)>0 return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and rp~=tp and Duel.IsChainNegatable(ev) and e:GetHandler():GetFlagEffect(m+10000)>0
......
...@@ -156,7 +156,7 @@ function cm.togop(e,tp,eg,ep,ev,re,r,rp) ...@@ -156,7 +156,7 @@ function cm.togop(e,tp,eg,ep,ev,re,r,rp)
local g3=Duel.SelectMatchingCard(tp,Card.IsAbleToGrave,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,mg:GetCount()-3,nil) local g3=Duel.SelectMatchingCard(tp,Card.IsAbleToGrave,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,mg:GetCount()-3,nil)
if g3:GetCount()>0 then if g3:GetCount()>0 then
Duel.HintSelection(g3) Duel.HintSelection(g3)
Duel.SendtoGrave(g3,REASON_EFFECT) Duel.SendtoGrave(g3,REASON_RULE)
end end
end end
end end
...@@ -244,3 +244,4 @@ function cm.spop1(e,tp,eg,ep,ev,re,r,rp) ...@@ -244,3 +244,4 @@ function cm.spop1(e,tp,eg,ep,ev,re,r,rp)
end end
end end
end end
...@@ -7,6 +7,7 @@ function cm.initial_effect(c) ...@@ -7,6 +7,7 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_DESTROY) e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_ATTACK_ANNOUNCE) e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(cm.condition) e1:SetCondition(cm.condition)
e1:SetTarget(cm.target) e1:SetTarget(cm.target)
e1:SetOperation(cm.activate) e1:SetOperation(cm.activate)
...@@ -206,4 +207,4 @@ function cm.impop1(e,tp,eg,ep,ev,re,r,rp) ...@@ -206,4 +207,4 @@ function cm.impop1(e,tp,eg,ep,ev,re,r,rp)
e1:SetValue(n+1) e1:SetValue(n+1)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
end end
end end
\ No newline at end of file
...@@ -9,6 +9,7 @@ function cm.initial_effect(c) ...@@ -9,6 +9,7 @@ function cm.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE) e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(cm.postg) e1:SetTarget(cm.postg)
e1:SetOperation(cm.posop) e1:SetOperation(cm.posop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
......
...@@ -6,7 +6,8 @@ function cm.initial_effect(c) ...@@ -6,7 +6,8 @@ function cm.initial_effect(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCategory(CATEGORY_REMOVE) e1:SetCategory(CATEGORY_REMOVE)
e1:SetCode(EVENT_TO_HAND) e1:SetCode(EVENT_TO_HAND)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(cm.ddtg) e1:SetTarget(cm.ddtg)
e1:SetOperation(cm.ddop) e1:SetOperation(cm.ddop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -49,7 +50,7 @@ function cm.initial_effect(c) ...@@ -49,7 +50,7 @@ function cm.initial_effect(c)
end end
--Activate --Activate
function cm.ddfilter(c,tp) function cm.ddfilter(c,tp)
return c:IsAbleToRemove(tp,POS_FACEDOWN) return c:IsAbleToRemove(tp,POS_FACEDOWN) and c:IsLocation(LOCATION_HAND)
end end
function cm.down(c) function cm.down(c)
return c:IsFacedown() and c:IsLocation(LOCATION_REMOVED) return c:IsFacedown() and c:IsLocation(LOCATION_REMOVED)
......
...@@ -52,7 +52,7 @@ function c33200506.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -52,7 +52,7 @@ function c33200506.activate(e,tp,eg,ep,ev,re,r,rp)
local g2=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c33200506.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp,chk1) local g2=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c33200506.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp,chk1)
if g1:GetCount()>0 and g2:GetCount()>0 then if g1:GetCount()>0 and g2:GetCount()>0 then
Duel.SendtoDeck(g1,nil,2,REASON_EFFECT) Duel.SendtoDeck(g1,nil,2,REASON_EFFECT)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g2,0,tp,tp,false,false,POS_FACEUP)
end end
end end
end end
......
...@@ -29,7 +29,7 @@ end ...@@ -29,7 +29,7 @@ end
function c33200508.activate(e,tp,eg,ep,ev,re,r,rp) function c33200508.activate(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end if not e:GetHandler():IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(c33200508.filter,tp,LOCATION_DECK,0,nil) local g=Duel.GetMatchingGroup(c33200508.filter,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(33200508,1)) then if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(33200508,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil) local sg=g:Select(tp,1,1,nil)
if Duel.SendtoHand(sg,nil,REASON_EFFECT) then if Duel.SendtoHand(sg,nil,REASON_EFFECT) then
......
...@@ -37,7 +37,7 @@ function cm.initial_effect(c) ...@@ -37,7 +37,7 @@ function cm.initial_effect(c)
e5:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) e5:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e5:SetType(EFFECT_TYPE_IGNITION) e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetRange(LOCATION_GRAVE) e5:SetRange(LOCATION_GRAVE)
e5:SetCountLimit(1,m) e5:SetCountLimit(1,m+10000)
e5:SetCondition(cm.con1) e5:SetCondition(cm.con1)
e5:SetCost(cm.cost2) e5:SetCost(cm.cost2)
e5:SetTarget(cm.sptg) e5:SetTarget(cm.sptg)
...@@ -65,15 +65,15 @@ end ...@@ -65,15 +65,15 @@ end
function cm.con2(e,tp,eg,ep,ev,re,r,rp) function cm.con2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsPlayerAffectedByEffect(tp,33401655) return Duel.IsPlayerAffectedByEffect(tp,33401655)
end end
function cm.refilter(c) function cm.refilter1(c)
return ((c:IsType(TYPE_EFFECT) and c:IsDisabled()) or c:IsType(TYPE_NORMAL) or c:IsType(TYPE_TOKEN)) and c:IsReleasable() return ((c:IsType(TYPE_EFFECT) and c:IsDisabled()) or c:IsType(TYPE_NORMAL) or c:IsType(TYPE_TOKEN)) and c:IsReleasable()
end end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsCanRemoveCounter(tp,1,0,0x34f,2,REASON_COST) or Duel.IsExistingMatchingCard(cm.refilter,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return Duel.IsCanRemoveCounter(tp,1,0,0x34f,2,REASON_COST) or Duel.IsExistingMatchingCard(cm.refilter1,tp,LOCATION_MZONE,0,1,nil) end
local b1=Duel.IsCanRemoveCounter(tp,1,0,0x34f,2,REASON_COST) local b1=Duel.IsCanRemoveCounter(tp,1,0,0x34f,2,REASON_COST)
local b2=Duel.IsExistingMatchingCard(cm.refilter,tp,LOCATION_MZONE,0,1,nil) local b2=Duel.IsExistingMatchingCard(cm.refilter1,tp,LOCATION_MZONE,0,1,nil)
if b2 and (not b1 or Duel.SelectYesNo(tp,aux.Stringid(m,2))) then if b2 and (not b1 or Duel.SelectYesNo(tp,aux.Stringid(m,2))) then
local g=Duel.SelectMatchingCard(tp,cm.refilter,tp,LOCATION_MZONE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,cm.refilter1,tp,LOCATION_MZONE,0,1,1,nil)
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
e:SetLabel(1) e:SetLabel(1)
else else
...@@ -93,7 +93,7 @@ function cm.thop2(e,tp,eg,ep,ev,re,r,rp) ...@@ -93,7 +93,7 @@ function cm.thop2(e,tp,eg,ep,ev,re,r,rp)
local g2=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) local g2=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if #g2>0 then if #g2>0 then
Duel.HintSelection(g2) Duel.HintSelection(g2)
if Duel.Destroy(g2,REASON_EFFECT)~=0 and Duel.SelectYesNo(tp,aux.Stringid(m,3)) then if Duel.Destroy(g2,REASON_EFFECT)~=0 and Duel.IsExistingMatchingCard(tp,aux.disfilter1,tp,LOCATION_ONFIELD,0,1,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(m,3)) then
local tg=Duel.SelectMatchingCard(tp,aux.disfilter1,tp,LOCATION_ONFIELD,0,1,1,nil) local tg=Duel.SelectMatchingCard(tp,aux.disfilter1,tp,LOCATION_ONFIELD,0,1,1,nil)
local tc=tg:GetFirst() local tc=tg:GetFirst()
Duel.NegateRelatedChain(tc,RESET_TURN_SET) Duel.NegateRelatedChain(tc,RESET_TURN_SET)
......
...@@ -49,6 +49,9 @@ end ...@@ -49,6 +49,9 @@ end
function cm.filter(c) function cm.filter(c)
return (c:IsType(TYPE_EFFECT) and c:IsDisabled()) or c:IsType(TYPE_NORMAL) or c:IsType(TYPE_TOKEN) or c:IsSetCard(0x9344) return (c:IsType(TYPE_EFFECT) and c:IsDisabled()) or c:IsType(TYPE_NORMAL) or c:IsType(TYPE_TOKEN) or c:IsSetCard(0x9344)
end end
function cm.lcheck(g)
return g:IsExists(Card.IsLinkSetCard,1,nil,0x9344)
end
function cm.atkval(e,c) function cm.atkval(e,c)
return Duel.GetMatchingGroupCount(cm.filter,e:GetHandlerPlayer(),LOCATION_MZONE,0,nil)*500 return Duel.GetMatchingGroupCount(cm.filter,e:GetHandlerPlayer(),LOCATION_MZONE,0,nil)*500
...@@ -89,7 +92,7 @@ function cm.thop2(e,tp,eg,ep,ev,re,r,rp) ...@@ -89,7 +92,7 @@ function cm.thop2(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,cm.thfilter2,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,cm.thfilter2,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if #g>0 then if #g>0 then
local ss=Duel.SendtoHand(g,nil,REASON_EFFECT) local ss=Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
end end
if e:GetLabel()==1 and Duel.IsExistingMatchingCard(cm.thfilter2,tp,LOCATION_GRAVE,0,1,nil)and Duel.SelectYesNo(tp,aux.Stringid(m,1)) if e:GetLabel()==1 and Duel.IsExistingMatchingCard(cm.thfilter2,tp,LOCATION_GRAVE,0,1,nil)and Duel.SelectYesNo(tp,aux.Stringid(m,1))
then then
......
...@@ -19,24 +19,33 @@ function cm.initial_effect(c) ...@@ -19,24 +19,33 @@ function cm.initial_effect(c)
e3:SetCode(EFFECT_REMAIN_FIELD) e3:SetCode(EFFECT_REMAIN_FIELD)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function cm.refilter(c,tp,re)
local flag=true
local value={Duel.IsPlayerAffectedByEffect(tp,EFFECT_CANNOT_RELEASE)}
if #value>0 then
for k,re in ipairs(value) do
local val=re:GetTarget()
if val and val(re,c,tp) then
flag=false
end
end
end
return c:IsReleasable() or (c:IsType(TYPE_SPELL+TYPE_TRAP) and flag)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
if Duel.IsExistingMatchingCard(Card.IsReleasable,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,e:GetHandler()) and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then if Duel.IsExistingMatchingCard(cm.refilter,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,e:GetHandler(),tp) and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,Card.IsReleasable,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,99,e:GetHandler()) local g=Duel.SelectMatchingCard(tp,cm.refilter,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,99,e:GetHandler(),tp)
local ss=Duel.Release(g,REASON_COST) local ss=Duel.SendtoGrave(g,REASON_COST+REASON_RELEASE)
e:SetLabel(ss) e:SetLabel(ss)
end end
end end
function cm.filter(c)
return c:IsFaceup() and c:IsCanAddCounter(0x34f,2)
end
function cm.chlimit(e,ep,tp) function cm.chlimit(e,ep,tp)
return tp==ep return tp==ep
end end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and cm.filter(chkc) end if chk==0 then return true end
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_ONFIELD,0,1,nil) end
if e:GetLabel()~=0 then if e:GetLabel()~=0 then
Duel.SetChainLimit(cm.chlimit) Duel.SetChainLimit(cm.chlimit)
end end
......
...@@ -30,7 +30,7 @@ function c40009413.initial_effect(c) ...@@ -30,7 +30,7 @@ function c40009413.initial_effect(c)
e2:SetOperation(c40009413.spop) e2:SetOperation(c40009413.spop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
c40009413.xyz_number=98 aux.xyz_number[40009413]=98
function c40009413.cfilter(c) function c40009413.cfilter(c)
return c:IsSetCard(0x95) and c:IsType(TYPE_SPELL) and c:IsDiscardable() return c:IsSetCard(0x95) and c:IsType(TYPE_SPELL) and c:IsDiscardable()
end end
......
...@@ -3,6 +3,7 @@ local cm=_G["c"..m] ...@@ -3,6 +3,7 @@ local cm=_G["c"..m]
cm.name="心化根绝神 阿日阿" cm.name="心化根绝神 阿日阿"
cm.upside_code=m-2 cm.upside_code=m-2
cm.downside_code=m cm.downside_code=m
cm.HartrazDownside=true
function cm.initial_effect(c) function cm.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
...@@ -18,6 +19,89 @@ function cm.initial_effect(c) ...@@ -18,6 +19,89 @@ function cm.initial_effect(c)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetOperation(cm.op) e2:SetOperation(cm.op)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local ex=Effect.CreateEffect(c)
ex:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ex:SetCode(EVENT_ADJUST)
ex:SetRange(0xff)
ex:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_SET_AVAILABLE)
ex:SetOperation(cm.backop)
c:RegisterEffect(ex)
if not cm.Hartrazcheck then
cm.Hartrazcheck=true
cm[5]=Duel.ChangePosition
Duel.ChangePosition=function(targets,au,ad,du,dd,...)
local tg=Group.__add(targets,targets)
local g=tg:Filter(function(c)return _G["c"..c:GetOriginalCode()].HartrazDownside end,nil)
if (not ad and au==POS_FACEDOWN_DEFENSE) or (ad and ((au and au==POS_FACEDOWN_DEFENSE) or (ad and ad==POS_FACEDOWN_DEFENSE) or (du and du==POS_FACEDOWN_DEFENSE) or (dd and dd==POS_FACEDOWN_DEFENSE))) then
Duel.SendtoGrave(g,REASON_RULE)
tg:Sub(g)
end
cm[5](tg,au,ad,du,dd,...)
end
cm[6]=Duel.SendtoGrave
Duel.SendtoGrave=function(targets,reason)
cm.ForcetoUpside(targets,reason)
cm[6](targets,reason)
end
cm[7]=Duel.Destroy
Duel.Destroy=function(targets,reason,...)
cm.ForcetoUpside(targets,reason)
cm[7](targets,reason,...)
end
cm[8]=Duel.Release
Duel.Release=function(targets,reason)
cm.ForcetoUpside(targets,reason)
cm[8](targets,reason)
end
cm[9]=Duel.Remove
Duel.Remove=function(targets,pos,reason)
cm.ForcetoUpside(targets,reason)
cm[9](targets,pos,reason)
end
cm[10]=Duel.SendtoDeck
Duel.SendtoDeck=function(targets,p,seq,reason)
cm.ForcetoUpside(targets,reason)
cm[10](targets,p,seq,reason)
end
cm[11]=Duel.SendtoHand
Duel.SendtoHand=function(targets,p,reason)
cm.ForcetoUpside(targets,reason)
cm[11](targets,p,reason)
end
end
end
function cm.ForcetoUpside(targets,reason)
local tg=Group.__add(targets,targets)
local g=tg:Filter(function(c)return _G["c"..c:GetOriginalCode()].HartrazDownside end,nil)
if #g>0 and reason&REASON_RULE==REASON_RULE then
for c in aux.Next(g) do
local tcode=c.upside_code
c:SetEntityCode(tcode)
if c:IsFacedown() then
Duel.ConfirmCards(0,Group.FromCards(c))
Duel.ConfirmCards(1,Group.FromCards(c))
end
c:ReplaceEffect(tcode,0,0)
Duel.Hint(HINT_CARD,0,tcode)
if c:IsLocation(LOCATION_HAND) then Duel.ShuffleHand(c:GetControler()) end
Duel.RaiseEvent(c,EVENT_ADJUST,nil,0,PLAYER_NONE,PLAYER_NONE,0)
end
end
end
function cm.backop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c.upside_code or c:GetOriginalCode()~=c.downside_code then return end
if c:IsLocation(LOCATION_MZONE) and c:IsFaceup() then return end
local tcode=c.upside_code
c:SetEntityCode(tcode)
if c:IsFacedown() then
Duel.ConfirmCards(tp,Group.FromCards(c))
Duel.ConfirmCards(1-tp,Group.FromCards(c))
end
c:ReplaceEffect(tcode,0,0)
Duel.Hint(HINT_CARD,0,tcode)
if c:IsLocation(LOCATION_HAND) then Duel.ShuffleHand(c:GetControler()) end
Duel.RaiseEvent(e:GetHandler(),EVENT_ADJUST,nil,0,PLAYER_NONE,PLAYER_NONE,0)
end end
function cm.rtg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.rtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -3,6 +3,7 @@ local cm=_G["c"..m] ...@@ -3,6 +3,7 @@ local cm=_G["c"..m]
cm.name="心化荒魔 吉戈伦" cm.name="心化荒魔 吉戈伦"
cm.upside_code=m-25 cm.upside_code=m-25
cm.downside_code=m cm.downside_code=m
cm.HartrazDownside=true
function cm.initial_effect(c) function cm.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
...@@ -19,6 +20,89 @@ function cm.initial_effect(c) ...@@ -19,6 +20,89 @@ function cm.initial_effect(c)
e2:SetTarget(cm.rtg) e2:SetTarget(cm.rtg)
e2:SetValue(function(e,c)return true end) e2:SetValue(function(e,c)return true end)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local ex=Effect.CreateEffect(c)
ex:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ex:SetCode(EVENT_ADJUST)
ex:SetRange(0xff)
ex:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_SET_AVAILABLE)
ex:SetOperation(cm.backop)
c:RegisterEffect(ex)
if not cm.Hartrazcheck then
cm.Hartrazcheck=true
cm[5]=Duel.ChangePosition
Duel.ChangePosition=function(targets,au,ad,du,dd,...)
local tg=Group.__add(targets,targets)
local g=tg:Filter(function(c)return _G["c"..c:GetOriginalCode()].HartrazDownside end,nil)
if (not ad and au==POS_FACEDOWN_DEFENSE) or (ad and ((au and au==POS_FACEDOWN_DEFENSE) or (ad and ad==POS_FACEDOWN_DEFENSE) or (du and du==POS_FACEDOWN_DEFENSE) or (dd and dd==POS_FACEDOWN_DEFENSE))) then
Duel.SendtoGrave(g,REASON_RULE)
tg:Sub(g)
end
cm[5](tg,au,ad,du,dd,...)
end
cm[6]=Duel.SendtoGrave
Duel.SendtoGrave=function(targets,reason)
cm.ForcetoUpside(targets,reason)
cm[6](targets,reason)
end
cm[7]=Duel.Destroy
Duel.Destroy=function(targets,reason,...)
cm.ForcetoUpside(targets,reason)
cm[7](targets,reason,...)
end
cm[8]=Duel.Release
Duel.Release=function(targets,reason)
cm.ForcetoUpside(targets,reason)
cm[8](targets,reason)
end
cm[9]=Duel.Remove
Duel.Remove=function(targets,pos,reason)
cm.ForcetoUpside(targets,reason)
cm[9](targets,pos,reason)
end
cm[10]=Duel.SendtoDeck
Duel.SendtoDeck=function(targets,p,seq,reason)
cm.ForcetoUpside(targets,reason)
cm[10](targets,p,seq,reason)
end
cm[11]=Duel.SendtoHand
Duel.SendtoHand=function(targets,p,reason)
cm.ForcetoUpside(targets,reason)
cm[11](targets,p,reason)
end
end
end
function cm.ForcetoUpside(targets,reason)
local tg=Group.__add(targets,targets)
local g=tg:Filter(function(c)return _G["c"..c:GetOriginalCode()].HartrazDownside end,nil)
if #g>0 and reason&REASON_RULE==REASON_RULE then
for c in aux.Next(g) do
local tcode=c.upside_code
c:SetEntityCode(tcode)
if c:IsFacedown() then
Duel.ConfirmCards(0,Group.FromCards(c))
Duel.ConfirmCards(1,Group.FromCards(c))
end
c:ReplaceEffect(tcode,0,0)
Duel.Hint(HINT_CARD,0,tcode)
if c:IsLocation(LOCATION_HAND) then Duel.ShuffleHand(c:GetControler()) end
Duel.RaiseEvent(c,EVENT_ADJUST,nil,0,PLAYER_NONE,PLAYER_NONE,0)
end
end
end
function cm.backop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c.upside_code or c:GetOriginalCode()~=c.downside_code then return end
if c:IsLocation(LOCATION_MZONE) and c:IsFaceup() then return end
local tcode=c.upside_code
c:SetEntityCode(tcode)
if c:IsFacedown() then
Duel.ConfirmCards(tp,Group.FromCards(c))
Duel.ConfirmCards(1-tp,Group.FromCards(c))
end
c:ReplaceEffect(tcode,0,0)
Duel.Hint(HINT_CARD,0,tcode)
if c:IsLocation(LOCATION_HAND) then Duel.ShuffleHand(c:GetControler()) end
Duel.RaiseEvent(e:GetHandler(),EVENT_ADJUST,nil,0,PLAYER_NONE,PLAYER_NONE,0)
end end
function cm.rtg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.rtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -3,6 +3,7 @@ local cm=_G["c"..m] ...@@ -3,6 +3,7 @@ local cm=_G["c"..m]
cm.name="心化寂魔 翁席恩" cm.name="心化寂魔 翁席恩"
cm.upside_code=m-25 cm.upside_code=m-25
cm.downside_code=m cm.downside_code=m
cm.HartrazDownside=true
function cm.initial_effect(c) function cm.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
...@@ -24,6 +25,89 @@ function cm.initial_effect(c) ...@@ -24,6 +25,89 @@ function cm.initial_effect(c)
e2:SetTarget(cm.rtg) e2:SetTarget(cm.rtg)
e2:SetValue(function(e,c)return true end) e2:SetValue(function(e,c)return true end)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local ex=Effect.CreateEffect(c)
ex:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ex:SetCode(EVENT_ADJUST)
ex:SetRange(0xff)
ex:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_SET_AVAILABLE)
ex:SetOperation(cm.backop)
c:RegisterEffect(ex)
if not cm.Hartrazcheck then
cm.Hartrazcheck=true
cm[5]=Duel.ChangePosition
Duel.ChangePosition=function(targets,au,ad,du,dd,...)
local tg=Group.__add(targets,targets)
local g=tg:Filter(function(c)return _G["c"..c:GetOriginalCode()].HartrazDownside end,nil)
if (not ad and au==POS_FACEDOWN_DEFENSE) or (ad and ((au and au==POS_FACEDOWN_DEFENSE) or (ad and ad==POS_FACEDOWN_DEFENSE) or (du and du==POS_FACEDOWN_DEFENSE) or (dd and dd==POS_FACEDOWN_DEFENSE))) then
Duel.SendtoGrave(g,REASON_RULE)
tg:Sub(g)
end
cm[5](tg,au,ad,du,dd,...)
end
cm[6]=Duel.SendtoGrave
Duel.SendtoGrave=function(targets,reason)
cm.ForcetoUpside(targets,reason)
cm[6](targets,reason)
end
cm[7]=Duel.Destroy
Duel.Destroy=function(targets,reason,...)
cm.ForcetoUpside(targets,reason)
cm[7](targets,reason,...)
end
cm[8]=Duel.Release
Duel.Release=function(targets,reason)
cm.ForcetoUpside(targets,reason)
cm[8](targets,reason)
end
cm[9]=Duel.Remove
Duel.Remove=function(targets,pos,reason)
cm.ForcetoUpside(targets,reason)
cm[9](targets,pos,reason)
end
cm[10]=Duel.SendtoDeck
Duel.SendtoDeck=function(targets,p,seq,reason)
cm.ForcetoUpside(targets,reason)
cm[10](targets,p,seq,reason)
end
cm[11]=Duel.SendtoHand
Duel.SendtoHand=function(targets,p,reason)
cm.ForcetoUpside(targets,reason)
cm[11](targets,p,reason)
end
end
end
function cm.ForcetoUpside(targets,reason)
local tg=Group.__add(targets,targets)
local g=tg:Filter(function(c)return _G["c"..c:GetOriginalCode()].HartrazDownside end,nil)
if #g>0 and reason&REASON_RULE==REASON_RULE then
for c in aux.Next(g) do
local tcode=c.upside_code
c:SetEntityCode(tcode)
if c:IsFacedown() then
Duel.ConfirmCards(0,Group.FromCards(c))
Duel.ConfirmCards(1,Group.FromCards(c))
end
c:ReplaceEffect(tcode,0,0)
Duel.Hint(HINT_CARD,0,tcode)
if c:IsLocation(LOCATION_HAND) then Duel.ShuffleHand(c:GetControler()) end
Duel.RaiseEvent(c,EVENT_ADJUST,nil,0,PLAYER_NONE,PLAYER_NONE,0)
end
end
end
function cm.backop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c.upside_code or c:GetOriginalCode()~=c.downside_code then return end
if c:IsLocation(LOCATION_MZONE) and c:IsFaceup() then return end
local tcode=c.upside_code
c:SetEntityCode(tcode)
if c:IsFacedown() then
Duel.ConfirmCards(tp,Group.FromCards(c))
Duel.ConfirmCards(1-tp,Group.FromCards(c))
end
c:ReplaceEffect(tcode,0,0)
Duel.Hint(HINT_CARD,0,tcode)
if c:IsLocation(LOCATION_HAND) then Duel.ShuffleHand(c:GetControler()) end
Duel.RaiseEvent(e:GetHandler(),EVENT_ADJUST,nil,0,PLAYER_NONE,PLAYER_NONE,0)
end end
function cm.rtg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.rtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -3,6 +3,7 @@ local cm=_G["c"..m] ...@@ -3,6 +3,7 @@ local cm=_G["c"..m]
cm.name="心化焚魔 赫弗诺" cm.name="心化焚魔 赫弗诺"
cm.upside_code=m-25 cm.upside_code=m-25
cm.downside_code=m cm.downside_code=m
cm.HartrazDownside=true
function cm.initial_effect(c) function cm.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
...@@ -28,6 +29,89 @@ function cm.initial_effect(c) ...@@ -28,6 +29,89 @@ function cm.initial_effect(c)
e3:SetValue(function(e,c)return true end) e3:SetValue(function(e,c)return true end)
c:RegisterEffect(e3) c:RegisterEffect(e3)
e2:SetLabelObject(e3) e2:SetLabelObject(e3)
local ex=Effect.CreateEffect(c)
ex:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ex:SetCode(EVENT_ADJUST)
ex:SetRange(0xff)
ex:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_SET_AVAILABLE)
ex:SetOperation(cm.backop)
c:RegisterEffect(ex)
if not cm.Hartrazcheck then
cm.Hartrazcheck=true
cm[5]=Duel.ChangePosition
Duel.ChangePosition=function(targets,au,ad,du,dd,...)
local tg=Group.__add(targets,targets)
local g=tg:Filter(function(c)return _G["c"..c:GetOriginalCode()].HartrazDownside end,nil)
if (not ad and au==POS_FACEDOWN_DEFENSE) or (ad and ((au and au==POS_FACEDOWN_DEFENSE) or (ad and ad==POS_FACEDOWN_DEFENSE) or (du and du==POS_FACEDOWN_DEFENSE) or (dd and dd==POS_FACEDOWN_DEFENSE))) then
Duel.SendtoGrave(g,REASON_RULE)
tg:Sub(g)
end
cm[5](tg,au,ad,du,dd,...)
end
cm[6]=Duel.SendtoGrave
Duel.SendtoGrave=function(targets,reason)
cm.ForcetoUpside(targets,reason)
cm[6](targets,reason)
end
cm[7]=Duel.Destroy
Duel.Destroy=function(targets,reason,...)
cm.ForcetoUpside(targets,reason)
cm[7](targets,reason,...)
end
cm[8]=Duel.Release
Duel.Release=function(targets,reason)
cm.ForcetoUpside(targets,reason)
cm[8](targets,reason)
end
cm[9]=Duel.Remove
Duel.Remove=function(targets,pos,reason)
cm.ForcetoUpside(targets,reason)
cm[9](targets,pos,reason)
end
cm[10]=Duel.SendtoDeck
Duel.SendtoDeck=function(targets,p,seq,reason)
cm.ForcetoUpside(targets,reason)
cm[10](targets,p,seq,reason)
end
cm[11]=Duel.SendtoHand
Duel.SendtoHand=function(targets,p,reason)
cm.ForcetoUpside(targets,reason)
cm[11](targets,p,reason)
end
end
end
function cm.ForcetoUpside(targets,reason)
local tg=Group.__add(targets,targets)
local g=tg:Filter(function(c)return _G["c"..c:GetOriginalCode()].HartrazDownside end,nil)
if #g>0 and reason&REASON_RULE==REASON_RULE then
for c in aux.Next(g) do
local tcode=c.upside_code
c:SetEntityCode(tcode)
if c:IsFacedown() then
Duel.ConfirmCards(0,Group.FromCards(c))
Duel.ConfirmCards(1,Group.FromCards(c))
end
c:ReplaceEffect(tcode,0,0)
Duel.Hint(HINT_CARD,0,tcode)
if c:IsLocation(LOCATION_HAND) then Duel.ShuffleHand(c:GetControler()) end
Duel.RaiseEvent(c,EVENT_ADJUST,nil,0,PLAYER_NONE,PLAYER_NONE,0)
end
end
end
function cm.backop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c.upside_code or c:GetOriginalCode()~=c.downside_code then return end
if c:IsLocation(LOCATION_MZONE) and c:IsFaceup() then return end
local tcode=c.upside_code
c:SetEntityCode(tcode)
if c:IsFacedown() then
Duel.ConfirmCards(tp,Group.FromCards(c))
Duel.ConfirmCards(1-tp,Group.FromCards(c))
end
c:ReplaceEffect(tcode,0,0)
Duel.Hint(HINT_CARD,0,tcode)
if c:IsLocation(LOCATION_HAND) then Duel.ShuffleHand(c:GetControler()) end
Duel.RaiseEvent(e:GetHandler(),EVENT_ADJUST,nil,0,PLAYER_NONE,PLAYER_NONE,0)
end end
function cm.rtg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.rtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -3,6 +3,7 @@ local cm=_G["c"..m] ...@@ -3,6 +3,7 @@ local cm=_G["c"..m]
cm.name="心化洪魔 卡塔斯凯德" cm.name="心化洪魔 卡塔斯凯德"
cm.upside_code=m-25 cm.upside_code=m-25
cm.downside_code=m cm.downside_code=m
cm.HartrazDownside=true
function cm.initial_effect(c) function cm.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
...@@ -24,6 +25,89 @@ function cm.initial_effect(c) ...@@ -24,6 +25,89 @@ function cm.initial_effect(c)
e2:SetTarget(cm.rtg) e2:SetTarget(cm.rtg)
e2:SetValue(function(e,c)return true end) e2:SetValue(function(e,c)return true end)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local ex=Effect.CreateEffect(c)
ex:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ex:SetCode(EVENT_ADJUST)
ex:SetRange(0xff)
ex:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_SET_AVAILABLE)
ex:SetOperation(cm.backop)
c:RegisterEffect(ex)
if not cm.Hartrazcheck then
cm.Hartrazcheck=true
cm[5]=Duel.ChangePosition
Duel.ChangePosition=function(targets,au,ad,du,dd,...)
local tg=Group.__add(targets,targets)
local g=tg:Filter(function(c)return _G["c"..c:GetOriginalCode()].HartrazDownside end,nil)
if (not ad and au==POS_FACEDOWN_DEFENSE) or (ad and ((au and au==POS_FACEDOWN_DEFENSE) or (ad and ad==POS_FACEDOWN_DEFENSE) or (du and du==POS_FACEDOWN_DEFENSE) or (dd and dd==POS_FACEDOWN_DEFENSE))) then
Duel.SendtoGrave(g,REASON_RULE)
tg:Sub(g)
end
cm[5](tg,au,ad,du,dd,...)
end
cm[6]=Duel.SendtoGrave
Duel.SendtoGrave=function(targets,reason)
cm.ForcetoUpside(targets,reason)
cm[6](targets,reason)
end
cm[7]=Duel.Destroy
Duel.Destroy=function(targets,reason,...)
cm.ForcetoUpside(targets,reason)
cm[7](targets,reason,...)
end
cm[8]=Duel.Release
Duel.Release=function(targets,reason)
cm.ForcetoUpside(targets,reason)
cm[8](targets,reason)
end
cm[9]=Duel.Remove
Duel.Remove=function(targets,pos,reason)
cm.ForcetoUpside(targets,reason)
cm[9](targets,pos,reason)
end
cm[10]=Duel.SendtoDeck
Duel.SendtoDeck=function(targets,p,seq,reason)
cm.ForcetoUpside(targets,reason)
cm[10](targets,p,seq,reason)
end
cm[11]=Duel.SendtoHand
Duel.SendtoHand=function(targets,p,reason)
cm.ForcetoUpside(targets,reason)
cm[11](targets,p,reason)
end
end
end
function cm.ForcetoUpside(targets,reason)
local tg=Group.__add(targets,targets)
local g=tg:Filter(function(c)return _G["c"..c:GetOriginalCode()].HartrazDownside end,nil)
if #g>0 and reason&REASON_RULE==REASON_RULE then
for c in aux.Next(g) do
local tcode=c.upside_code
c:SetEntityCode(tcode)
if c:IsFacedown() then
Duel.ConfirmCards(0,Group.FromCards(c))
Duel.ConfirmCards(1,Group.FromCards(c))
end
c:ReplaceEffect(tcode,0,0)
Duel.Hint(HINT_CARD,0,tcode)
if c:IsLocation(LOCATION_HAND) then Duel.ShuffleHand(c:GetControler()) end
Duel.RaiseEvent(c,EVENT_ADJUST,nil,0,PLAYER_NONE,PLAYER_NONE,0)
end
end
end
function cm.backop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c.upside_code or c:GetOriginalCode()~=c.downside_code then return end
if c:IsLocation(LOCATION_MZONE) and c:IsFaceup() then return end
local tcode=c.upside_code
c:SetEntityCode(tcode)
if c:IsFacedown() then
Duel.ConfirmCards(tp,Group.FromCards(c))
Duel.ConfirmCards(1-tp,Group.FromCards(c))
end
c:ReplaceEffect(tcode,0,0)
Duel.Hint(HINT_CARD,0,tcode)
if c:IsLocation(LOCATION_HAND) then Duel.ShuffleHand(c:GetControler()) end
Duel.RaiseEvent(e:GetHandler(),EVENT_ADJUST,nil,0,PLAYER_NONE,PLAYER_NONE,0)
end end
function cm.rtg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.rtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -3,6 +3,7 @@ local cm=_G["c"..m] ...@@ -3,6 +3,7 @@ local cm=_G["c"..m]
cm.name="心化君魔 冬贝司" cm.name="心化君魔 冬贝司"
cm.upside_code=m-25 cm.upside_code=m-25
cm.downside_code=m cm.downside_code=m
cm.HartrazDownside=true
if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end
function cm.initial_effect(c) function cm.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
...@@ -21,6 +22,89 @@ function cm.initial_effect(c) ...@@ -21,6 +22,89 @@ function cm.initial_effect(c)
e2:SetTarget(cm.rtg) e2:SetTarget(cm.rtg)
e2:SetValue(function(e,c)return true end) e2:SetValue(function(e,c)return true end)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local ex=Effect.CreateEffect(c)
ex:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ex:SetCode(EVENT_ADJUST)
ex:SetRange(0xff)
ex:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_SET_AVAILABLE)
ex:SetOperation(cm.backop)
c:RegisterEffect(ex)
if not cm.Hartrazcheck then
cm.Hartrazcheck=true
cm[5]=Duel.ChangePosition
Duel.ChangePosition=function(targets,au,ad,du,dd,...)
local tg=Group.__add(targets,targets)
local g=tg:Filter(function(c)return _G["c"..c:GetOriginalCode()].HartrazDownside end,nil)
if (not ad and au==POS_FACEDOWN_DEFENSE) or (ad and ((au and au==POS_FACEDOWN_DEFENSE) or (ad and ad==POS_FACEDOWN_DEFENSE) or (du and du==POS_FACEDOWN_DEFENSE) or (dd and dd==POS_FACEDOWN_DEFENSE))) then
Duel.SendtoGrave(g,REASON_RULE)
tg:Sub(g)
end
cm[5](tg,au,ad,du,dd,...)
end
cm[6]=Duel.SendtoGrave
Duel.SendtoGrave=function(targets,reason)
cm.ForcetoUpside(targets,reason)
cm[6](targets,reason)
end
cm[7]=Duel.Destroy
Duel.Destroy=function(targets,reason,...)
cm.ForcetoUpside(targets,reason)
cm[7](targets,reason,...)
end
cm[8]=Duel.Release
Duel.Release=function(targets,reason)
cm.ForcetoUpside(targets,reason)
cm[8](targets,reason)
end
cm[9]=Duel.Remove
Duel.Remove=function(targets,pos,reason)
cm.ForcetoUpside(targets,reason)
cm[9](targets,pos,reason)
end
cm[10]=Duel.SendtoDeck
Duel.SendtoDeck=function(targets,p,seq,reason)
cm.ForcetoUpside(targets,reason)
cm[10](targets,p,seq,reason)
end
cm[11]=Duel.SendtoHand
Duel.SendtoHand=function(targets,p,reason)
cm.ForcetoUpside(targets,reason)
cm[11](targets,p,reason)
end
end
end
function cm.ForcetoUpside(targets,reason)
local tg=Group.__add(targets,targets)
local g=tg:Filter(function(c)return _G["c"..c:GetOriginalCode()].HartrazDownside end,nil)
if #g>0 and reason&REASON_RULE==REASON_RULE then
for c in aux.Next(g) do
local tcode=c.upside_code
c:SetEntityCode(tcode)
if c:IsFacedown() then
Duel.ConfirmCards(0,Group.FromCards(c))
Duel.ConfirmCards(1,Group.FromCards(c))
end
c:ReplaceEffect(tcode,0,0)
Duel.Hint(HINT_CARD,0,tcode)
if c:IsLocation(LOCATION_HAND) then Duel.ShuffleHand(c:GetControler()) end
Duel.RaiseEvent(c,EVENT_ADJUST,nil,0,PLAYER_NONE,PLAYER_NONE,0)
end
end
end
function cm.backop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c.upside_code or c:GetOriginalCode()~=c.downside_code then return end
if c:IsLocation(LOCATION_MZONE) and c:IsFaceup() then return end
local tcode=c.upside_code
c:SetEntityCode(tcode)
if c:IsFacedown() then
Duel.ConfirmCards(tp,Group.FromCards(c))
Duel.ConfirmCards(1-tp,Group.FromCards(c))
end
c:ReplaceEffect(tcode,0,0)
Duel.Hint(HINT_CARD,0,tcode)
if c:IsLocation(LOCATION_HAND) then Duel.ShuffleHand(c:GetControler()) end
Duel.RaiseEvent(e:GetHandler(),EVENT_ADJUST,nil,0,PLAYER_NONE,PLAYER_NONE,0)
end end
function cm.immval(e,re) function cm.immval(e,re)
local g=Duel.GetMatchingGroup(function(c)return c:IsFaceup() and c:IsType(TYPE_FUSION)end,e:GetHandlerPlayer(),LOCATION_MZONE,0,nil) local g=Duel.GetMatchingGroup(function(c)return c:IsFaceup() and c:IsType(TYPE_FUSION)end,e:GetHandlerPlayer(),LOCATION_MZONE,0,nil)
......
...@@ -42,19 +42,23 @@ function c60000106.initial_effect(c) ...@@ -42,19 +42,23 @@ function c60000106.initial_effect(c)
end end
function c60000106.sprfilter(c,tp,g,sc) function c60000106.sprfilter(c,tp,g,sc)
local lv=c:GetLevel() local lv=c:GetLevel()
return c:IsFaceup() and (lv==9 or (c:IsSetCard(0xa6a1) or c:IsSetCard(0xa6a2) or (c:IsType(TYPE_MONSTER) and c:IsSetCard(0x56a9)))) and (Duel.GetLocationCountFromEx(tp,tp,c)>0 or Duel.GetMZoneCount(tp,c)>0) return c:IsFaceup() and (lv==9 or (c:IsSetCard(0xa6a1) or c:IsSetCard(0xa6a2) or (c:IsType(TYPE_MONSTER) and c:IsSetCard(0x56a9))))
end end
function c60000106.spgckfil(g,e,tp)
return Duel.GetLocationCountFromEx(tp,tp,g,nil)
end
function c60000106.sprcon(e,c) function c60000106.sprcon(e,c)
if c==nil then return true end if c==nil then return true end
local tp=c:GetControler() local tp=c:GetControler()
return Duel.IsExistingMatchingCard(c60000106.sprfilter,tp,LOCATION_ONFIELD,0,5,nil) local g=Duel.GetMatchingGroup(c60000106.sprfilter,tp,LOCATION_ONFIELD,0,nil)
return g:CheckSubGroup(c60000106.spgckfil,5,5,e,tp)
end end
function c60000106.sprop(e,tp,eg,ep,ev,re,r,rp,c) function c60000106.sprop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetMatchingGroup(c60000106.sprfilter,tp,LOCATION_ONFIELD,0,nil) local g=Duel.GetMatchingGroup(c60000106.sprfilter,tp,LOCATION_ONFIELD,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local g1=g:Select(tp,5,5,nil) local g1=g:SelectSubGroup(tp,c60000106.spgckfil,false,5,5,e,tp)
e:GetHandler():SetMaterial(g1) c:SetMaterial(g1)
Duel.Overlay(e:GetHandler(),g1) Duel.Overlay(c,g1)
end end
function c60000106.thcost(e,tp,eg,ep,ev,re,r,rp,chk) function c60000106.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
......
...@@ -40,8 +40,9 @@ function c60000116.acop(e,tp,eg,ep,ev,re,r,rp) ...@@ -40,8 +40,9 @@ function c60000116.acop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
Duel.SendtoDeck(tc,tp,2,REASON_EFFECT) Duel.SendtoDeck(tc,tp,2,REASON_EFFECT)
Duel.ShuffleDeck(tp) Duel.ShuffleDeck(tp)
if Duel.GetDecktopGroup(tp,1):GetFirst():IsCode(tc:GetCode()) then local code=tc:GetCode()
if code and Duel.GetDecktopGroup(tp,1):GetFirst():IsCode(code) then
Duel.Draw(tp,1,REASON_EFFECT) Duel.Draw(tp,1,REASON_EFFECT)
--negate --negate
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
......
--休比·多拉 相位移动 --休比·多拉 相位移动
function c60000118.initial_effect(c) function c60000118.initial_effect(c)
c:EnableReviveLimit()
--SpecialSummon --SpecialSummon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
...@@ -37,7 +38,7 @@ function c60000118.rlfil(c) ...@@ -37,7 +38,7 @@ function c60000118.rlfil(c)
return c:IsReleasable() and c:IsSetCard(0x56a9) and Duel.GetMZoneCount(tp,c)>0 return c:IsReleasable() and c:IsSetCard(0x56a9) and Duel.GetMZoneCount(tp,c)>0
end end
function c60000118.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function c60000118.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(Card.IsReleasable,tp,LOCATION_MZONE,0,nil) local g=Duel.GetRitualMaterial(tp)
local b1=g:CheckWithSumEqual(Card.GetLevel,8,1,99) local b1=g:CheckWithSumEqual(Card.GetLevel,8,1,99)
local b2=not Duel.IsExistingMatchingCard(c60000118.ckfil,tp,LOCATION_MZONE,0,1,nil) and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)~=0 and Duel.IsExistingMatchingCard(c60000118.rlfil,tp,LOCATION_DECK,0,1,nil) local b2=not Duel.IsExistingMatchingCard(c60000118.ckfil,tp,LOCATION_MZONE,0,1,nil) and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)~=0 and Duel.IsExistingMatchingCard(c60000118.rlfil,tp,LOCATION_DECK,0,1,nil)
if chk==0 then return b1 or b2 end if chk==0 then return b1 or b2 end
...@@ -48,15 +49,33 @@ function c60000118.spcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -48,15 +49,33 @@ function c60000118.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
else else
e:SetLabel(1) e:SetLabel(1)
end end
end end
function c60000118.ckfil(c,e,tp)
return c:GetSummonPlayer()==1-tp
end
function c60000118.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c60000118.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,false) end if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,true,false) and eg:IsExists(c60000118.ckfil,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,tp,LOCATION_HAND+LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,tp,LOCATION_HAND+LOCATION_GRAVE)
end end
function c60000118.spop(e,tp,eg,ep,ev,re,r,rp) function c60000118.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then local op=e:GetLabel()
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) local g=Duel.GetRitualMaterial(tp)
if c:IsRelateToEffect(e) then
if op==0 then
if g:CheckWithSumEqual(Card.GetLevel,8,1,99) then
local rg=g:SelectWithSumEqual(tp,Card.GetLevel,8,1,99)
c:SetMaterial(rg)
Duel.ReleaseRitualMaterial(rg)
Duel.SpecialSummon(c,SUMMON_TYPE_RITUAL,tp,tp,true,false,POS_FACEUP)
else
if Duel.IsExistingMatchingCard(c60000118.rlfil,tp,LOCATION_DECK,0,1,nil) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
local rg=Duel.SelectMatchingCard(tp,c60000118.rlfil,tp,LOCATION_DECK,0,1,1,nil)
c:SetMaterial(rg)
Duel.ReleaseRitualMaterial(rg)
Duel.SpecialSummon(c,SUMMON_TYPE_RITUAL,tp,tp,true,false,POS_FACEUP)
end
end
end end
end end
function c60000118.discon(e,tp,eg,ep,ev,re,r,rp) function c60000118.discon(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -29,7 +29,7 @@ function cm.initial_effect(c) ...@@ -29,7 +29,7 @@ function cm.initial_effect(c)
e2:SetOperation(cm.spop) e2:SetOperation(cm.spop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
cm.xyz_number=98 aux.xyz_number[m]=98
function cm.confilter(c) function cm.confilter(c)
return c:IsFaceup() and c:IsSetCard(0x107f) return c:IsFaceup() and c:IsSetCard(0x107f)
end end
...@@ -44,15 +44,15 @@ function cm.filter(c) ...@@ -44,15 +44,15 @@ function cm.filter(c)
return c:IsSetCard(0x48) and c:IsRace(RACE_WARRIOR) return c:IsSetCard(0x48) and c:IsRace(RACE_WARRIOR)
end end
function cm.descon(e,tp,eg,ep,ev,re,r,rp) function cm.descon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c:GetOverlayGroup():IsExists(cm.filter,1,nil) return c:GetOverlayGroup():IsExists(cm.filter,1,nil)
end end
function cm.descost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end end
function cm.spfilter(c,e,tp) function cm.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and cm.spfilter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and cm.spfilter(chkc,e,tp) end
......
...@@ -42,13 +42,13 @@ function cm.initial_effect(c) ...@@ -42,13 +42,13 @@ function cm.initial_effect(c)
c:RegisterEffect(e4) c:RegisterEffect(e4)
-- --
local e5=Effect.CreateEffect(c) local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e5:SetCode(EVENT_SPSUMMON_SUCCESS) e5:SetCode(EVENT_SPSUMMON_SUCCESS)
e5:SetCondition(cm.regcon) e5:SetCondition(cm.regcon)
e5:SetOperation(cm.matop) e5:SetOperation(cm.matop)
c:RegisterEffect(e5) c:RegisterEffect(e5)
--to grave --to grave
end end
function cm.regcon(e,tp,eg,ep,ev,re,r,rp) function cm.regcon(e,tp,eg,ep,ev,re,r,rp)
return re and re:GetHandler():IsSetCard(0x95) and re:GetHandler():IsType(TYPE_SPELL) return re and re:GetHandler():IsSetCard(0x95) and re:GetHandler():IsType(TYPE_SPELL)
...@@ -70,7 +70,7 @@ function cm.atkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -70,7 +70,7 @@ function cm.atkop(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_CHAIN) e1:SetReset(RESET_CHAIN)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
end end
cm.xyz_number=23 aux.xyz_number[m]=23
function cm.aclimit(e,re,tp) function cm.aclimit(e,re,tp)
return re:IsHasType(EFFECT_TYPE_ACTIVATE) or re:GetHandler():IsType(TYPE_MONSTER) return re:IsHasType(EFFECT_TYPE_ACTIVATE) or re:GetHandler():IsType(TYPE_MONSTER)
end end
...@@ -128,5 +128,5 @@ function cm.aclimit3(e,re,tp) ...@@ -128,5 +128,5 @@ function cm.aclimit3(e,re,tp)
return re:IsActiveType(TYPE_TRAP) return re:IsActiveType(TYPE_TRAP)
end end
function cm.matop(e,tp,eg,ep,ev,re,r,rp) function cm.matop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,1)) e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,1))
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