Commit 0b626da2 authored by Tachibana's avatar Tachibana

eme

parent 74aad258
......@@ -3,7 +3,7 @@ local m=12892013
local cm=_G["c"..m]
function c12892013.initial_effect(c)
c:EnableReviveLimit()
aux.AddXyzProcedure(c,nil,7,6,cm.ovfilter,aux.Stringid(m,0),6,cm.xyzop)
aux.AddXyzProcedure(c,cm.mfilter,7,6,cm.vfilter,aux.Stringid(m,0))
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_REMOVE)
......@@ -38,13 +38,16 @@ function cm.xyzcheck(c)
return c:IsType(TYPE_MONSTER)
end
function cm.ovfilter(c)
return c:IsFaceup() and c:IsSetCard(0x7a72) and c:IsType(TYPE_XYZ) and Duel.GetMatchingGroup(cm.sfilter,tp,LOCATION_ONFIELD,0,nil)
return c:IsFaceup() and c:IsSetCard(0x8a72) and c:IsType(TYPE_XYZ) and Duel.GetMatchingGroup(cm.sfilter,tp,LOCATION_ONFIELD,0,nil)
end
function cm.vfilter(c)
return c:IsFaceup() and c:IsSetCard(0x8a72) and c:IsType(TYPE_XYZ) and Duel.GetMatchingGroup(cm.sfilter,tp,LOCATION_ONFIELD,0,nil) and not c:IsCode(m)
end
function cm.olcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
end
function cm.olfilter(c,tp,g)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x7a72)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x8a72)
end
function cm.olop(e,tp,eg,ep,ev,re,r,rp)
if Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
......
......@@ -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
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