Commit 3b2c6f78 authored by Nemo Ma's avatar Nemo Ma

fix

parent 2a5baead
......@@ -69,7 +69,8 @@ function cm.spcost2(e,tp,eg,ep,ev,re,r,rp,chk)
end
function cm.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
local te=e:GetLabelObject()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(te,0,tp,true,false) and not e:GetHandler():IsStatus(STATUS_CHAINING) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(te,0,tp,true,false) and e:GetHandler():GetFlagEffect(m)==0 end
e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_CHAIN,0,1)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function cm.spop2(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -44,14 +44,21 @@ function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
local num=eg:FilterCount(Card.IsType,nil,TYPE_MONSTER)
return rp==1-tp and num>=1
end
function cm.spfilter(c,e,tp,eg)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and eg:IsContains(c)
function cm.tgfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsLocation(LOCATION_GRAVE)
end
function cm.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.spfilter2(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsRelateToEffect(e)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local num=eg:FilterCount(Card.IsType,nil,TYPE_MONSTER)
local tg=Duel.GetMatchingGroup(cm.spfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil,e,tp,eg)
if chk==0 then return (num>=2 or (Duel.IsPlayerAffectedByEffect(tp,11451481) and num>=1)) and not Duel.IsPlayerAffectedByEffect(tp,59822133) and Duel.GetLocationCount(tp,LOCATION_MZONE)>1 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and #tg>0 end
local tg=eg:Filter(cm.tgfilter,nil)
local spg=tg:Filter(cm.spfilter,nil,e,tp)
if chk==0 then return (num>=2 or (Duel.IsPlayerAffectedByEffect(tp,11451481) and num>=1)) and not Duel.IsPlayerAffectedByEffect(tp,59822133) and Duel.GetLocationCount(tp,LOCATION_MZONE)>1 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and #spg>0 end
if Duel.IsPlayerAffectedByEffect(tp,11451481) then
if num>=2 then
local op=Duel.SelectOption(tp,aux.Stringid(11451483,2),aux.Stringid(11451483,3))
......@@ -73,7 +80,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsPlayerAffectedByEffect(tp,59822133) or Duel.GetLocationCount(tp,LOCATION_MZONE)<2 or not c:IsRelateToEffect(e) or not c:IsCanBeSpecialSummoned(e,0,tp,false,false) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local tg=g:Filter(aux.NecroValleyFilter(Card.IsRelateToEffect),nil,e)
local tg=g:Filter(aux.NecroValleyFilter(cm.spfilter2),nil,e,tp)
if #tg>0 then
tg:AddCard(c)
Duel.SpecialSummon(tg,0,tp,tp,false,false,POS_FACEUP)
......
......@@ -86,7 +86,8 @@ function cm.ngcon(e,tp,eg,ep,ev,re,r,rp)
return ((a>=1 and Duel.IsPlayerAffectedByEffect(tp,11451482)) or a>=2) and b>0
end
function cm.ngtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDestructable() and not e:GetHandler():IsStatus(STATUS_CHAINING) end
if chk==0 then return e:GetHandler():IsDestructable() and e:GetHandler():GetFlagEffect(m)==0 end
e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_CHAIN,0,1)
local a,b=0,1
for i=1,ev do
local te,tgp=Duel.GetChainInfo(i,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
......
......@@ -53,9 +53,12 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
if chk==0 then return Duel.IsExistingTarget(cm.filter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,1,e:GetHandler()) end
e:SetProperty(EFFECT_FLAG_CARD_TARGET)
local _GetCurrentChain=Duel.GetCurrentChain
Duel.GetCurrentChain=function() return _GetCurrentChain()-1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,cm.filter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,1,1,e:GetHandler())
local te,ceg,cep,cev,cre,cr,crp=g:GetFirst():CheckActivateEffect(false,true,true)
Duel.GetCurrentChain=_GetCurrentChain
Duel.ClearTargetCard()
g:GetFirst():CreateEffectRelation(e)
local tg=te:GetTarget()
......
......@@ -98,6 +98,10 @@ function cm.trop(e,tp,eg,ep,ev,re,r,rp)
e2:SetOperation(cm.rsop)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2,true)
local e3=e2:Clone()
e3:SetCode(EVENT_CHAIN_NEGATED)
e3:SetOperation(cm.rsop2)
tc:RegisterEffect(e3,true)
tc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,1))
end
end
......@@ -113,4 +117,7 @@ function cm.rscon(e,tp,eg,ep,ev,re,r,rp)
end
function cm.rsop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():ResetFlagEffect(m)
end
function cm.rsop2(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))
end
\ No newline at end of file
......@@ -77,7 +77,7 @@ end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c:GetRank()+3,c) and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL) end
c:RegisterFlagEffect(m,RESET_CHAIN,0,0)
c:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_CHAIN,0,1)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -37,7 +37,7 @@ function cm.initial_effect(c)
e8:SetCode(EFFECT_ADD_TYPE)
e8:SetValue(TYPE_EFFECT)
e8:SetRange(LOCATION_SZONE)
e8:SetTargetRange(LOCATION_HAND+LOCATION_GRAVE,0)
e8:SetTargetRange(LOCATION_HAND+LOCATION_GRAVE+LOCATION_MZONE,0)
e8:SetTarget(cm.betg)
c:RegisterEffect(e8)
end
......@@ -110,8 +110,8 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
if op then op(e,tp,eg,ep,ev,re,r,rp) end
end
function cm.eftg(e,c)
return c:IsSetCard(0x132)
return c:IsSetCard(0x132) and c:IsType(TYPE_MONSTER)
end
function cm.betg(e,c)
return c:IsSetCard(0x132) and not c:IsType(TYPE_EFFECT)
return c:IsSetCard(0x132) and c:IsType(TYPE_MONSTER) and not c:IsType(TYPE_EFFECT)
end
\ No newline at end of file
......@@ -56,7 +56,8 @@ function cm.sltg(e,tp,eg,ep,ev,re,r,rp,chk)
local mg=Duel.GetMatchingGroup(cm.filter3,tp,LOCATION_HAND+LOCATION_MZONE,0,nil)
local c=e:GetHandler()
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(cm.filter1,tp,LOCATION_GRAVE,0,2,nil) and Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_EXTRA,0,1,nil,mg) and not (c:IsStatus(STATUS_EFFECT_ENABLED) and c:IsStatus(STATUS_CHAINING)) end
if chk==0 then return Duel.IsExistingTarget(cm.filter1,tp,LOCATION_GRAVE,0,2,nil) and Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_EXTRA,0,1,nil,mg) and e:GetHandler():GetFlagEffect(m)==0 end
e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_CHAIN,0,1)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,cm.filter1,tp,LOCATION_GRAVE,0,2,2,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,2,0,0)
......
......@@ -16,6 +16,7 @@ function cm.initial_effect(c)
e2:SetCategory(CATEGORY_REMOVE+CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,m)
e2:SetCost(aux.bfgcost)
e2:SetTarget(cm.target)
e2:SetOperation(cm.activate)
......
......@@ -2,6 +2,8 @@
local m=33701507
local cm=_G["c"..m]
function cm.initial_effect(c)
c:EnableCounterPermit(0x9440)
c:SetCounterLimit(0x9440,5)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
......@@ -105,12 +107,9 @@ function cm.indcon(e)
return Duel.IsExistingMatchingCard(cm.indfilter,tp,LOCATION_ONFIELD,0,1,e:GetHandler())
end
function cm.checkop(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
while tc do
if tc:IsLevelAbove(1) and tc:IsSetCard(0x9440) then
cm[ep]=math.max(cm[ep],tc:GetLevel())
end
tc=eg:GetNext()
local tc=re:GetHandler()
if tc:IsLevelAbove(1) and tc:IsSetCard(0x9440) then
cm[ep]=math.max(cm[ep],tc:GetLevel())
end
end
function cm.clear(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -39,15 +39,29 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,33701517,0,0x4011,0,0,1,RACE_FAIRY,ATTRIBUTE_LIGHT) then return end
local token=Duel.CreateToken(tp,33701517)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(m,2))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetCondition(cm.con)
token:RegisterEffect(e1,true)
e1:SetCode(EFFECT_SET_BASE_ATTACK)
e1:SetValue(0)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD)
token:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_SET_BASE_DEFENSE)
token:RegisterEffect(e2)
local e3=e1:Clone()
e3:SetCode(EFFECT_CHANGE_LEVEL)
e3:SetValue(1)
token:RegisterEffect(e3)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP)
local e4=Effect.CreateEffect(e:GetHandler())
e4:SetDescription(aux.Stringid(m,2))
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT)
e4:SetReset(RESET_EVENT+RESETS_STANDARD)
e4:SetCondition(cm.con)
token:RegisterEffect(e4,true)
Duel.SpecialSummonComplete()
end
function cm.indfilter(c)
return c:IsCode(33701507) and c:IsFaceup()
......
......@@ -47,7 +47,7 @@ function cm.initial_effect(c)
end
function cm.discon(e)
return bit.band(cm[e:GetControler()],0x1<<(e:GetHandler():GetLevel()-1))>0
return bit.band(cm[e:GetControler()],0x1<<(e:GetHandler():GetLevel()-1))<=0
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
......@@ -63,18 +63,33 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,33701517,0,0x4011,500,500,2,RACE_FAIRY,ATTRIBUTE_LIGHT) then return end
local token=Duel.CreateToken(tp,33701517)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_BASE_ATTACK)
e1:SetValue(500)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD)
token:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_SET_BASE_DEFENSE)
token:RegisterEffect(e2)
local e3=e1:Clone()
e3:SetCode(EFFECT_CHANGE_LEVEL)
e3:SetValue(2)
token:RegisterEffect(e3)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP)
--end battle phase
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,2))
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetCondition(cm.condition)
e1:SetCost(cm.spcost)
e1:SetOperation(cm.operation)
token:RegisterEffect(e1,true)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,2))
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_ATTACK_ANNOUNCE)
e4:SetRange(LOCATION_MZONE)
e4:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e4:SetReset(RESET_EVENT+RESETS_STANDARD)
e4:SetCondition(cm.condition)
e4:SetCost(cm.spcost)
e4:SetOperation(cm.operation)
token:RegisterEffect(e4,true)
Duel.SpecialSummonComplete()
end
function cm.indfilter(c)
return c:IsCode(33701507) and c:IsFaceup()
......
......@@ -46,7 +46,7 @@ function cm.initial_effect(c)
end
function cm.discon(e)
return bit.band(cm[e:GetControler()],0x1<<(e:GetHandler():GetLevel()-1))>0
return bit.band(cm[e:GetControler()],0x1<<(e:GetHandler():GetLevel()-1))<=0
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
......@@ -62,15 +62,29 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,33701517,0,0x4011,1000,1000,3,RACE_FAIRY,ATTRIBUTE_LIGHT) then return end
local token=Duel.CreateToken(tp,33701517)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(m,2))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetCondition(cm.con)
token:RegisterEffect(e1,true)
e1:SetCode(EFFECT_SET_BASE_ATTACK)
e1:SetValue(1000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD)
token:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_SET_BASE_DEFENSE)
token:RegisterEffect(e2)
local e3=e1:Clone()
e3:SetCode(EFFECT_CHANGE_LEVEL)
e3:SetValue(3)
token:RegisterEffect(e3)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP)
local e4=Effect.CreateEffect(e:GetHandler())
e4:SetDescription(aux.Stringid(m,2))
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT)
e4:SetReset(RESET_EVENT+RESETS_STANDARD)
e4:SetCondition(cm.con)
token:RegisterEffect(e4,true)
Duel.SpecialSummonComplete()
end
function cm.con(e)
return Duel.IsExistingMatchingCard(cm.indfilter,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,1,nil)
......
......@@ -42,7 +42,7 @@ function c33701511.initial_effect(c)
end
function cm.discon(e)
return bit.band(cm[e:GetControler()],0x1<<(e:GetHandler():GetLevel()-1))>0
return bit.band(cm[e:GetControler()],0x1<<(e:GetHandler():GetLevel()-1))<=0
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
......@@ -58,18 +58,33 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,33701517,0,0x4011,1500,1500,4,RACE_FAIRY,ATTRIBUTE_LIGHT) then return end
local token=Duel.CreateToken(tp,33701517)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_BASE_ATTACK)
e1:SetValue(0)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD)
token:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_SET_BASE_DEFENSE)
token:RegisterEffect(e2)
local e3=e1:Clone()
e3:SetCode(EFFECT_CHANGE_LEVEL)
e3:SetValue(1)
token:RegisterEffect(e3)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP)
--end battle phase
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,2))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetCondition(cm.atcon)
e1:SetCost(cm.spcost)
e1:SetTarget(cm.attg)
e1:SetOperation(cm.atop)
token:RegisterEffect(e1,true)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,2))
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_MZONE)
e4:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e4:SetCondition(cm.atcon)
e4:SetCost(cm.spcost)
e4:SetTarget(cm.attg)
e4:SetOperation(cm.atop)
e4:SetReset(RESET_EVENT+RESETS_STANDARD)
token:RegisterEffect(e4,true)
Duel.SpecialSummonComplete()
end
function cm.indfilter(c)
return c:IsCode(33701507) and c:IsFaceup()
......
......@@ -24,16 +24,6 @@ function cm.initial_effect(c)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCondition(cm.condition)
e2:SetCost(cm.cost)
e2:SetOperation(cm.operation)
c:RegisterEffect(e2)
if not cm.global_check then
cm.global_check=true
cm[0]=0
......@@ -47,7 +37,7 @@ function cm.initial_effect(c)
end
function cm.discon(e)
return bit.band(cm[e:GetControler()],0x1<<(e:GetHandler():GetLevel()-1))>0
return bit.band(cm[e:GetControler()],0x1<<(e:GetHandler():GetLevel()-1))<=0
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
......@@ -63,7 +53,33 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,33701517,0,0x4011,2000,2000,5,RACE_FAIRY,ATTRIBUTE_LIGHT) then return end
local token=Duel.CreateToken(tp,33701517)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_BASE_ATTACK)
e1:SetValue(2000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD)
token:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_SET_BASE_DEFENSE)
token:RegisterEffect(e2)
local e3=e1:Clone()
e3:SetCode(EFFECT_CHANGE_LEVEL)
e3:SetValue(5)
token:RegisterEffect(e3)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,1))
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1)
e4:SetReset(RESET_EVENT+RESETS_STANDARD)
e4:SetCondition(cm.condition)
e4:SetCost(cm.spcost)
e4:SetOperation(cm.operation)
token:RegisterEffect(e4,true)
Duel.SpecialSummonComplete()
end
function cm.indfilter(c)
return c:IsCode(33701507) and c:IsFaceup()
......
......@@ -24,29 +24,6 @@ function cm.initial_effect(c)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_DAMAGE)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(cm.condition)
e2:SetCost(cm.cost)
e2:SetTarget(cm.damtg)
e2:SetOperation(cm.damop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetDescription(aux.Stringid(m,2))
e3:SetCategory(CATEGORY_RECOVER)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(cm.condition)
e3:SetCost(cm.cost)
e3:SetTarget(cm.rectg)
e3:SetOperation(cm.recop)
c:RegisterEffect(e3)
if not cm.global_check then
cm.global_check=true
cm[0]=0
......@@ -60,7 +37,7 @@ function cm.initial_effect(c)
end
function cm.discon(e)
return bit.band(cm[e:GetControler()],0x1<<(e:GetHandler():GetLevel()-1))>0
return bit.band(cm[e:GetControler()],0x1<<(e:GetHandler():GetLevel()-1))<=0
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
......@@ -76,7 +53,46 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,33701517,0,0x4011,2500,2500,6,RACE_FAIRY,ATTRIBUTE_LIGHT) then return end
local token=Duel.CreateToken(tp,33701517)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_BASE_ATTACK)
e1:SetValue(2500)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD)
token:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_SET_BASE_DEFENSE)
token:RegisterEffect(e2)
local e3=e1:Clone()
e3:SetCode(EFFECT_CHANGE_LEVEL)
e3:SetValue(6)
token:RegisterEffect(e3)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_DAMAGE)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(cm.condition)
e2:SetCost(cm.cost)
e2:SetTarget(cm.damtg)
e2:SetOperation(cm.damop)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
token:RegisterEffect(e2,true)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,2))
e3:SetCategory(CATEGORY_RECOVER)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(cm.condition)
e3:SetCost(cm.cost)
e3:SetTarget(cm.rectg)
e3:SetOperation(cm.recop)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
token:RegisterEffect(e3,true)
Duel.SpecialSummonComplete()
end
function cm.indfilter(c)
return c:IsCode(33701507) and c:IsFaceup()
......
......@@ -46,7 +46,7 @@ function cm.initial_effect(c)
end
function cm.discon(e)
return bit.band(cm[e:GetControler()],0x1<<(e:GetHandler():GetLevel()-1))>0
return bit.band(cm[e:GetControler()],0x1<<(e:GetHandler():GetLevel()-1))<=0
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
......@@ -62,7 +62,20 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,33701517,0,0x4011,3000,3000,7,RACE_FAIRY,ATTRIBUTE_LIGHT) then return end
local token=Duel.CreateToken(tp,33701517)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_BASE_ATTACK)
e1:SetValue(3000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD)
token:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_SET_BASE_DEFENSE)
token:RegisterEffect(e2)
local e3=e1:Clone()
e3:SetCode(EFFECT_CHANGE_LEVEL)
e3:SetValue(7)
token:RegisterEffect(e3)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP)
--cannot target
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......@@ -71,6 +84,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
e1:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET)
e1:SetCondition(cm.con)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
token:RegisterEffect(e1,true)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
......@@ -79,6 +93,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local e3=e1:Clone()
e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
token:RegisterEffect(e3,true)
Duel.SpecialSummonComplete()
end
function cm.imfilter(c)
return c:IsSetCard(0x9440) and c:IsLevelBelow(6)
......
......@@ -28,8 +28,8 @@ function cm.initial_effect(c)
c:RegisterEffect(e3)
if not cm.global_check then
cm.global_check=true
cm[0]=Group.CreateGroup()
cm[1]=Group.CreateGroup()
cm[0]=0
cm[1]=0
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_CHAIN_SOLVED)
......@@ -63,7 +63,15 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp,c)
end
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return cm[ep]:Group.GetClassCount(Card.GetLevel())>=7
local ct=0
local n=cm[ep]
while n do
if (n%2)==1 then
ct=ct+1
end
n=n>>1
end
return ct>=7
end
function cm.winop(e,tp,eg,ep,ev,re,r,rp)
local WIN_REASON_CREATORGOD=0x13
......@@ -71,11 +79,8 @@ function cm.winop(e,tp,eg,ep,ev,re,r,rp)
Duel.Win(p,WIN_REASON_CREATORGOD)
end
function cm.checkop(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
while tc do
if tc:IsLevelAbove(1) and tc:IsSetCard(0x9440) and not cm[ep]:IsContains(tc) then
cm[ep]:AddCard(tc)
end
tc=eg:GetNext()
local tc=re:GetHandler()
if tc:IsLevelAbove(1) and tc:IsSetCard(0x9440) then
cm[ep]=bit.bor(cm[ep],0x1<<tc:GetLevel())
end
end
......@@ -28,8 +28,8 @@ function cm.initial_effect(c)
c:RegisterEffect(e3)
if not cm.global_check then
cm.global_check=true
cm[0]=Group.CreateGroup()
cm[1]=Group.CreateGroup()
cm[0]=0
cm[1]=0
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_CHAIN_SOLVED)
......@@ -63,7 +63,15 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp,c)
end
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return cm[ep]:Group.GetClassCount(Card.GetLevel())>=7
local ct=0
local n=cm[ep]
while n do
if (n%2)==1 then
ct=ct+1
end
n=n>>1
end
return ct>=7
end
function cm.winop(e,tp,eg,ep,ev,re,r,rp)
local p=e:GetHandler():GetSummonPlayer()
......@@ -90,7 +98,7 @@ function cm.efilter(e,re)
end
function cm.checkop(e,tp,eg,ep,ev,re,r,rp)
local tc=re:GetHandler()
if tc:IsLevelAbove(1) and tc:IsSetCard(0x9440) and not cm[ep]:IsContains(tc) then
cm[ep]:AddCard(tc)
if tc:IsLevelAbove(1) and tc:IsSetCard(0x9440) then
cm[ep]=bit.bor(cm[ep],0x1<<tc:GetLevel())
end
end
......@@ -71,11 +71,14 @@ function cm.eqop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
if g:GetCount()>0 then
local tc1=g:GetFirst()
sg:AddCard(c)
tc1:SetMaterial(sg)
Duel.SpecialSummon(tc1,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)
Duel.Overlay(tc1,sg)
tc1:CompleteProcedure()
if sg:GetFirst():IsOnField() then
if not (sg:GetFirst():IsOnField() and c:IsOnField()) then return end
sg:AddCard(c)
tc1:SetMaterial(sg)
Duel.SpecialSummon(tc1,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)
Duel.Overlay(tc1,sg)
tc1:CompleteProcedure()
end
end
end
end
\ No newline at end of file
......@@ -76,12 +76,15 @@ function cm.eqop(e,tp,eg,ep,ev,re,r,rp)
if g:GetCount()>0 and not sg:GetFirst():IsImmuneToEffect(e) then
local tc1=g:GetFirst()
local tc2=sg:GetFirst()
local g1=Group.FromCards(c,tc2)
Duel.HintSelection(g1)
Duel.SendtoGrave(g1,REASON_EFFECT)
Duel.BreakEffect()
Duel.SpecialSummon(tc1,SUMMON_TYPE_SYNCHRO,tp,tp,false,false,POS_FACEUP)
tc1:CompleteProcedure()
if sg:GetFirst():IsOnField() then
if not (sg:GetFirst():IsOnField() and c:IsOnField()) then return end
local g1=Group.FromCards(c,tc2)
Duel.HintSelection(g1)
Duel.SendtoGrave(g1,REASON_EFFECT)
Duel.BreakEffect()
Duel.SpecialSummon(tc1,SUMMON_TYPE_SYNCHRO,tp,tp,false,false,POS_FACEUP)
tc1:CompleteProcedure()
end
end
end
end
\ No newline at end of file
......@@ -76,12 +76,15 @@ function cm.eqop(e,tp,eg,ep,ev,re,r,rp)
if g:GetCount()>0 then
local tc1=g:GetFirst()
local tc2=sg:GetFirst()
local g1=Group.FromCards(c,tc2)
Duel.HintSelection(g1)
Duel.SendtoGrave(g1,REASON_EFFECT)
Duel.BreakEffect()
Duel.SpecialSummon(tc1,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
tc1:CompleteProcedure()
if sg:GetFirst():IsOnField() then
if not (sg:GetFirst():IsOnField() and c:IsOnField()) then return end
local g1=Group.FromCards(c,tc2)
Duel.HintSelection(g1)
Duel.SendtoGrave(g1,REASON_EFFECT)
Duel.BreakEffect()
Duel.SpecialSummon(tc1,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
tc1:CompleteProcedure()
end
end
end
end
\ No newline at end of file
......@@ -57,13 +57,13 @@ function c72100124.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local b1=Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c72100124.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE+LOCATION_EXTRA,0,1,nil)
and Duel.IsExistingMatchingCard(c72100124.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE+LOCATION_EXTRA,0,1,c)
local b2=Duel.IsExistingMatchingCard(c72100124.spfilter2,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil,tp)
return b1 or b2
end
function c72100124.spop(e,tp,eg,ep,ev,re,r,rp,c)
local b1=Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c72100124.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_EXTRA+LOCATION_GRAVE,0,1,nil)
and Duel.IsExistingMatchingCard(c72100124.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_EXTRA+LOCATION_GRAVE,0,1,c)
local b2=Duel.IsExistingMatchingCard(c72100124.spfilter2,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil,tp)
if b2 and (not b1 or Duel.SelectYesNo(tp,aux.Stringid(48829461,0))) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
......@@ -73,7 +73,7 @@ function c72100124.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Remove(tg,POS_FACEUP,REASON_COST)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local tg=Duel.SelectMatchingCard(tp,c72100124.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_EXTRA+LOCATION_GRAVE,0,1,1,nil)
local tg=Duel.SelectMatchingCard(tp,c72100124.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_EXTRA+LOCATION_GRAVE,0,1,1,c)
Duel.Remove(tg,POS_FACEUP,REASON_COST)
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