Commit 1559f14c authored by TanakaKotoha's avatar TanakaKotoha

mopempoe

parent c74c808d
No preview for this file type
......@@ -2,24 +2,24 @@
function c113211.initial_effect(c)
c:EnableCounterPermit(0xcad)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetOperation(c113211.activate)
c:RegisterEffect(e1)
local e0=Effect.CreateEffect(c)
e0:SetCategory(CATEGORY_SPECIAL_SUMMON)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
e0:SetOperation(c113211.activate)
c:RegisterEffect(e0)
--disable spsummon
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_SZONE)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,0)
e2:SetTarget(c113211.splimit)
c:RegisterEffect(e2)
local e0=e2:Clone()
e0:SetCode(EFFECT_CANNOT_SUMMON)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_SZONE)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(c113211.splimit)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_SUMMON)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
......@@ -37,15 +37,15 @@ function c113211.initial_effect(c)
--atk def
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_FIELD)
e6:SetCode(EFFECT_UPDATE_ATTACK)
e6:SetRange(LOCATION_SZONE)
e6:SetTargetRange(LOCATION_MZONE,0)
e6:SetCode(EFFECT_UPDATE_ATTACK)
e6:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xca12))
e6:SetValue(c113211.val)
c:RegisterEffect(e6)
e6:SetTarget(c113211.atktg)
e6:SetValue(c113211.atkval)
c:RegisterEffect(e6,true)
local e7=e6:Clone()
e7:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e7)
c:RegisterEffect(e7,true)
--counter
local e8=Effect.CreateEffect(c)
e8:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
......@@ -56,8 +56,11 @@ function c113211.initial_effect(c)
e8:SetOperation(c113211.ctop1)
c:RegisterEffect(e8)
end
function c113211.val(e,c,Counter)
return Duel.GetCounter(tp,LOCATION_ONFIELD,0,0xcad)*100
function c113211.atktg(e,c)
return c:IsAttribute(ATTRIBUTE_WATER)
end
function c113211.atkval(e,c)
return Duel.GetCounter(c:GetControler(),1,0,0xcad)*100
end
function c113211.thfilter(c,e,tp)
return c:IsSetCard(0xcad) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......@@ -81,7 +84,7 @@ function c113211.cop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():AddCounter(0xcad,1)
end
function c113211.cfilter(c)
return c:IsLocation(LOCATION_MZONE) and c:IsSetCard(0xca12) and c:IsType(TYPE_MONSTER) and c:IsPreviousLocation(LOCATION_MZONE)
return c:IsLocation(LOCATION_MZONE) and c:IsSetCard(0xcad) and c:IsType(TYPE_MONSTER) and c:IsPreviousLocation(LOCATION_MZONE)
end
function c113211.ctcon1(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c113211.cfilter,1,nil)
......
......@@ -5,6 +5,7 @@ function c113212.initial_effect(c)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCountLimit(1)
e1:SetTarget(c113212.zotg)
......@@ -24,12 +25,14 @@ function c113212.initial_effect(c)
c:RegisterEffect(e2)
end
function c113212.zotg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_MZONE,0,1,e:GetHandler(),0xcad) end
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_MZONE,0,1,e:GetHandler(),0xcad) and Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)>0 end
local g=Duel.SelectMatchingCard(tp,Card.IsSetCard,tp,LOCATION_MZONE,0,1,1,e:GetHandler(),0xcad)
Duel.SetTargetCard(g)
end
function c113212.zoop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) or tc:IsControler(1-tp)
or Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)<1 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE)
local s=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,0)
local nseq=math.log(s,2)
......
......@@ -31,11 +31,12 @@ function cm.spfil(c,e,tp)
return c:IsLevelBelow(4) and c:IsAttribute(ATTRIBUTE_WATER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.dctg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>=1 end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)>0 end
Duel.SetOperationInfo(0,CATEGORY_DICE,nil,0,tp,1)
end
function cm.dcop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)<1 then return end
local d=Duel.TossDice(tp,1)
if d==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE)
......
......@@ -7,6 +7,7 @@ function cm.initial_effect(c)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCountLimit(1)
e1:SetTarget(cm.zotg)
......@@ -26,12 +27,14 @@ function cm.initial_effect(c)
c:RegisterEffect(e2)
end
function cm.zotg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_MZONE,0,1,nil,0xcad) end
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_MZONE,0,1,nil,0xcad) and Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)>0 end
local g=Duel.SelectMatchingCard(tp,Card.IsSetCard,tp,LOCATION_MZONE,0,1,1,nil,0xcad)
Duel.SetTargetCard(g)
end
function cm.zoop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) or tc:IsControler(1-tp)
or Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)<1 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE)
local s=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,0)
local nseq=math.log(s,2)
......
......@@ -90,8 +90,8 @@ function cm.splimit(e,c)
return not c:IsRace(RACE_PLANT)
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() and c:IsSummonType(SUMMON_TYPE_ADVANCE) end
Duel.Release(e:GetHandler(),REASON_COST)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() and c:IsSummonType(SUMMON_TYPE_ADVANCE) end
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_HAND,0,1,nil) end
......
......@@ -16,8 +16,8 @@ function cm.initial_effect(c)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetRange(LOCATION_SZONE)
e2:SetCondition(cm.atkcon)
e2:SetTarget(cm.atktg)
e2:SetOperation(cm.atkop)
e2:SetTarget(cm.atktg1)
e2:SetOperation(cm.atkop1)
c:RegisterEffect(e2)
--atkup
local e2=Effect.CreateEffect(c)
......@@ -70,7 +70,7 @@ end
function cm.atkcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.cfilter,1,nil,tp,SUMMON_TYPE_NORMAL)
end
function cm.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
function cm.atktg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1000)
......@@ -83,7 +83,7 @@ end
function cm.filter(c)
return c:IsSetCard(0xafac) and c:IsAbleToHand()
end
function cm.atkop(e,tp,eg,ep,ev,re,r,rp)
function cm.atkop1(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Recover(p,d,REASON_EFFECT)
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
......
......@@ -21,14 +21,6 @@ function c33400202.initial_effect(c)
e2:SetCondition(c33400202.sgcn)
e2:SetOperation(c33400202.operation)
c:RegisterEffect(e2)
end
function c33400202.cnfilter(c)
return c:IsSetCard(0x6342) and not c:IsCode(33400202)
end
function c33400202.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c33400202.cnfilter,tp,LOCATION_GRAVE+LOCATION_ONFIELD,0,1,nil)
end
function c33400202.efilter(e,re)
return e:GetOwnerPlayer()~=re:GetOwnerPlayer()
......@@ -52,7 +44,6 @@ function c33400202.activate1(e,tp,eg,ep,ev,re,r,rp)
e4:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e4:SetOwnerPlayer(tp)
tc1:RegisterEffect(e4)
end
end
Duel.SpecialSummonStep(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)
......@@ -60,7 +51,6 @@ function c33400202.activate1(e,tp,eg,ep,ev,re,r,rp)
else Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT)
end
end
function c33400202.sgcn(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_EFFECT) or e:GetHandler():IsReason(REASON_BATTLE)
end
......
......@@ -16,9 +16,8 @@ function cm.initial_effect(c)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1,m+10000)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,m+10000)
e2:SetTarget(cm.target)
e2:SetOperation(cm.activate)
c:RegisterEffect(e2)
......@@ -39,15 +38,12 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 or not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
function cm.filter(c,e,tp)
return c:IsSetCard(0x6342) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_DECK) and cm.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
local g=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_DECK+LOCATION_GRAVE,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
......@@ -60,7 +56,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if tc:IsCode(ac) then
if Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil,e,tp) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g1=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_DECK,0,1,1,nil)
local g1=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g1:GetCount()>0 then
Duel.SpecialSummon(g1,0,tp,tp,false,false,POS_FACEUP)
end
......@@ -73,7 +69,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
else
if Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g1=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_GRAVE,0,1,1,nil)
local g1=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
if g1:GetCount()>0 then
Duel.SpecialSummon(g1,0,tp,tp,false,false,POS_FACEUP)
end
......@@ -87,4 +83,4 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
end
end
end
end
\ No newline at end of file
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