Commit 24508008 authored by TanakaKotoha's avatar TanakaKotoha

mopemope

parent a387ffc8
...@@ -29,10 +29,16 @@ function cm.initial_effect(c) ...@@ -29,10 +29,16 @@ function cm.initial_effect(c)
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE) e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1) e2:SetCountLimit(1)
e2:SetCondition(cm.condition) e2:SetCondition(cm.spcon1)
e2:SetTarget(cm.target) e2:SetTarget(cm.target)
e2:SetOperation(cm.operation) e2:SetOperation(cm.operation)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetHintTiming(0,TIMING_END_PHASE)
e3:SetCondition(cm.spcon2)
c:RegisterEffect(e3)
end end
function cm.thfilter(c) function cm.thfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsCode(26818000,26818001) and c:IsAbleToHand() return c:IsType(TYPE_MONSTER) and c:IsCode(26818000,26818001) and c:IsAbleToHand()
...@@ -67,8 +73,11 @@ end ...@@ -67,8 +73,11 @@ end
function cm.cfilter(c) function cm.cfilter(c)
return c:IsFaceup() and c:IsCode(26818000,26818001) return c:IsFaceup() and c:IsCode(26818000,26818001)
end end
function cm.condition(e,tp,eg,ep,ev,re,r,rp) function cm.spcon1(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil) return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil) and not Duel.IsPlayerAffectedByEffect(tp,26818065)
end
function cm.spcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil) and Duel.IsPlayerAffectedByEffect(tp,26818065)
end end
function cm.filter(c,e,sp) function cm.filter(c,e,sp)
return c:IsLevel(3) and c:IsCanBeSpecialSummoned(e,0,sp,false,false) return c:IsLevel(3) and c:IsCanBeSpecialSummoned(e,0,sp,false,false)
......
...@@ -27,10 +27,17 @@ function cm.initial_effect(c) ...@@ -27,10 +27,17 @@ function cm.initial_effect(c)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_SZONE) e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1) e3:SetCountLimit(1)
e3:SetCondition(cm.spcon1)
e3:SetCost(cm.thcost) e3:SetCost(cm.thcost)
e3:SetTarget(cm.thtg) e3:SetTarget(cm.thtg)
e3:SetOperation(cm.thop) e3:SetOperation(cm.thop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetHintTiming(0,TIMING_END_PHASE)
e4:SetCondition(cm.spcon2)
c:RegisterEffect(e4)
end end
function cm.tsfilter(c) function cm.tsfilter(c)
return c:IsType(TYPE_MONSTER) and (aux.IsCodeListed(c,26818000) or aux.IsCodeListed(c,26818001)) and c:IsLevel(3) and c:IsAbleToHand() return c:IsType(TYPE_MONSTER) and (aux.IsCodeListed(c,26818000) or aux.IsCodeListed(c,26818001)) and c:IsLevel(3) and c:IsAbleToHand()
...@@ -45,6 +52,12 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -45,6 +52,12 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmCards(1-tp,sg) Duel.ConfirmCards(1-tp,sg)
end end
end end
function cm.spcon1(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsPlayerAffectedByEffect(tp,26818065)
end
function cm.spcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsPlayerAffectedByEffect(tp,26818065)
end
function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
......
...@@ -18,9 +18,16 @@ function cm.initial_effect(c) ...@@ -18,9 +18,16 @@ function cm.initial_effect(c)
e2:SetRange(LOCATION_SZONE) e2:SetRange(LOCATION_SZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1) e2:SetCountLimit(1)
e2:SetCondition(cm.spcon1)
e2:SetTarget(cm.destg) e2:SetTarget(cm.destg)
e2:SetOperation(cm.desop) e2:SetOperation(cm.desop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e4=e2:Clone()
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetHintTiming(0,TIMING_END_PHASE)
e4:SetCondition(cm.spcon2)
c:RegisterEffect(e4)
--destroy --destroy
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,3)) e3:SetDescription(aux.Stringid(m,3))
...@@ -29,9 +36,16 @@ function cm.initial_effect(c) ...@@ -29,9 +36,16 @@ function cm.initial_effect(c)
e3:SetRange(LOCATION_SZONE) e3:SetRange(LOCATION_SZONE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCountLimit(1) e3:SetCountLimit(1)
e3:SetCondition(cm.spcon1)
e3:SetTarget(cm.tgtg) e3:SetTarget(cm.tgtg)
e3:SetOperation(cm.tgop) e3:SetOperation(cm.tgop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
local e7=e3:Clone()
e7:SetType(EFFECT_TYPE_QUICK_O)
e7:SetCode(EVENT_FREE_CHAIN)
e7:SetHintTiming(0,TIMING_END_PHASE)
e7:SetCondition(cm.spcon2)
c:RegisterEffect(e7)
end end
function cm.spfilter(c,e,tp) function cm.spfilter(c,e,tp)
return c:IsLevel(3) and (aux.IsCodeListed(c,26818000) or aux.IsCodeListed(c,26818001)) and (c:IsAbleToHand() or (Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false))) return c:IsLevel(3) and (aux.IsCodeListed(c,26818000) or aux.IsCodeListed(c,26818001)) and (c:IsAbleToHand() or (Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)))
...@@ -67,6 +81,12 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -67,6 +81,12 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
end end
end end
end end
function cm.spcon1(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsPlayerAffectedByEffect(tp,26818065)
end
function cm.spcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsPlayerAffectedByEffect(tp,26818065)
end
function cm.desfilter(c) function cm.desfilter(c)
return c:IsFaceup() and c:IsLevel(3) return c:IsFaceup() and c:IsLevel(3)
end end
......
...@@ -28,9 +28,16 @@ function cm.initial_effect(c) ...@@ -28,9 +28,16 @@ function cm.initial_effect(c)
e3:SetRange(LOCATION_SZONE) e3:SetRange(LOCATION_SZONE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCountLimit(1) e3:SetCountLimit(1)
e3:SetCondition(cm.spcon1)
e3:SetTarget(cm.target) e3:SetTarget(cm.target)
e3:SetOperation(cm.operation) e3:SetOperation(cm.operation)
c:RegisterEffect(e3) c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetHintTiming(0,TIMING_END_PHASE)
e4:SetCondition(cm.spcon2)
c:RegisterEffect(e4)
end end
function cm.tsfilter(c) function cm.tsfilter(c)
return c:IsType(TYPE_MONSTER) and (aux.IsCodeListed(c,26818000) or aux.IsCodeListed(c,26818001)) and c:IsAbleToHand() return c:IsType(TYPE_MONSTER) and (aux.IsCodeListed(c,26818000) or aux.IsCodeListed(c,26818001)) and c:IsAbleToHand()
...@@ -76,6 +83,12 @@ function cm.atkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -76,6 +83,12 @@ function cm.atkop(e,tp,eg,ep,ev,re,r,rp)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
end end
end end
function cm.spcon1(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsPlayerAffectedByEffect(tp,26818065)
end
function cm.spcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsPlayerAffectedByEffect(tp,26818065)
end
function cm.filter(c) function cm.filter(c)
return c:IsFaceup() and c:IsLevel(3) and (aux.IsCodeListed(c,26818000) or aux.IsCodeListed(c,26818001)) return c:IsFaceup() and c:IsLevel(3) and (aux.IsCodeListed(c,26818000) or aux.IsCodeListed(c,26818001))
end end
......
...@@ -15,10 +15,16 @@ function cm.initial_effect(c) ...@@ -15,10 +15,16 @@ function cm.initial_effect(c)
e3:SetType(EFFECT_TYPE_IGNITION) e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_SZONE) e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1) e3:SetCountLimit(1)
e3:SetCost(cm.thcon) e3:SetCondition(cm.spcon1)
e3:SetTarget(cm.thtg) e3:SetTarget(cm.thtg)
e3:SetOperation(cm.thop) e3:SetOperation(cm.thop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetHintTiming(0,TIMING_END_PHASE)
e4:SetCondition(cm.spcon2)
c:RegisterEffect(e4)
--Special Summon --Special Summon
local e5=Effect.CreateEffect(c) local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_SPECIAL_SUMMON) e5:SetCategory(CATEGORY_SPECIAL_SUMMON)
...@@ -71,12 +77,15 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -71,12 +77,15 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
tc:RegisterEffect(e2) tc:RegisterEffect(e2)
end end
end end
function cm.spcon1(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.ffilter,tp,LOCATION_MZONE,0,1,nil) and not Duel.IsPlayerAffectedByEffect(tp,26818065)
end
function cm.spcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.ffilter,tp,LOCATION_MZONE,0,1,nil) and Duel.IsPlayerAffectedByEffect(tp,26818065)
end
function cm.ffilter(c) function cm.ffilter(c)
return c:IsFaceup() and c:IsLevel(9) return c:IsFaceup() and c:IsLevel(9)
end end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.ffilter,tp,LOCATION_MZONE,0,1,nil)
end
function cm.thfilter(c) function cm.thfilter(c)
return c:IsLevel(3) and c:IsAbleToHand() return c:IsLevel(3) and c:IsAbleToHand()
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