Commit 2dcc3811 authored by POLYMER's avatar POLYMER

fix

parent e9564194
...@@ -82,7 +82,7 @@ function cm.atkval(e,c) ...@@ -82,7 +82,7 @@ function cm.atkval(e,c)
return Duel.GetMatchingGroupCount(cm.atkfilter,e:GetHandlerPlayer(),LOCATION_ONFIELD+LOCATION_EXTRA,0,nil)*1000 return Duel.GetMatchingGroupCount(cm.atkfilter,e:GetHandlerPlayer(),LOCATION_ONFIELD+LOCATION_EXTRA,0,nil)*1000
end end
function cm.indcon(e) function cm.indcon(e)
return e:GetHandler():GetAttack()<=4000 return e:GetHandler():GetAttack()>=4000
end end
function cm.efilter(e,te) function cm.efilter(e,te)
return te:GetOwner()~=e:GetOwner() return te:GetOwner()~=e:GetOwner()
......
...@@ -6738,7 +6738,6 @@ function cm.DragoronActivate(c,code) ...@@ -6738,7 +6738,6 @@ function cm.DragoronActivate(c,code)
end end
ADGD_CRegisterEffect=Card.RegisterEffect ADGD_CRegisterEffect=Card.RegisterEffect
Card.RegisterEffect=function(rc,re,...) Card.RegisterEffect=function(rc,re,...)
if re and re:GetCode()==117 and rc:GetType()==re:GetValue() then return end
if Dragoron_Reset_Check then if Dragoron_Reset_Check then
local e1=Effect.CreateEffect(rc) local e1=Effect.CreateEffect(rc)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
...@@ -6749,6 +6748,7 @@ function cm.DragoronActivate(c,code) ...@@ -6749,6 +6748,7 @@ function cm.DragoronActivate(c,code)
Duel.RegisterEffect(e1,rp) Duel.RegisterEffect(e1,rp)
Dragoron_Reset_Check=false Dragoron_Reset_Check=false
end end
if re and re:GetCode()==117 and rc:GetType()==re:GetValue() then return end
return ADGD_CRegisterEffect(rc,re,...) return ADGD_CRegisterEffect(rc,re,...)
end end
ADGD_DRegisterEffect=Duel.RegisterEffect ADGD_DRegisterEffect=Duel.RegisterEffect
...@@ -6840,6 +6840,7 @@ function cm.ADGDTypeChange(c) ...@@ -6840,6 +6840,7 @@ function cm.ADGDTypeChange(c)
e1:SetCode(EVENT_MOVE) e1:SetCode(EVENT_MOVE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsLocation(LOCATION_SZONE) and e:GetHandler():GetSequence()<5 then return end
e:GetHandler():SetCardData(4,0x80002) e:GetHandler():SetCardData(4,0x80002)
for k,v in pairs(t) do v:Reset() end for k,v in pairs(t) do v:Reset() end
end) end)
......
...@@ -11,7 +11,7 @@ function cm.initial_effect(c) ...@@ -11,7 +11,7 @@ function cm.initial_effect(c)
e9:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e9:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e9:SetProperty(EFFECT_FLAG_DELAY) e9:SetProperty(EFFECT_FLAG_DELAY)
e9:SetCode(EVENT_CHAINING) e9:SetCode(EVENT_CHAINING)
e9:SetRange(LOCATION_FZONE) e9:SetRange(LOCATION_SZONE)
e9:SetCountLimit(1,EFFECT_COUNT_CODE_CHAIN) e9:SetCountLimit(1,EFFECT_COUNT_CODE_CHAIN)
e9:SetCondition(cm.pcon) e9:SetCondition(cm.pcon)
e9:SetTarget(cm.ptg) e9:SetTarget(cm.ptg)
......
...@@ -11,7 +11,7 @@ function cm.initial_effect(c) ...@@ -11,7 +11,7 @@ function cm.initial_effect(c)
e9:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e9:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e9:SetProperty(EFFECT_FLAG_DELAY) e9:SetProperty(EFFECT_FLAG_DELAY)
e9:SetCode(EVENT_CHAINING) e9:SetCode(EVENT_CHAINING)
e9:SetRange(LOCATION_FZONE) e9:SetRange(LOCATION_SZONE)
e9:SetCountLimit(1,EFFECT_COUNT_CODE_CHAIN) e9:SetCountLimit(1,EFFECT_COUNT_CODE_CHAIN)
e9:SetCondition(cm.pcon) e9:SetCondition(cm.pcon)
e9:SetTarget(cm.ptg) e9:SetTarget(cm.ptg)
......
...@@ -11,7 +11,7 @@ function cm.initial_effect(c) ...@@ -11,7 +11,7 @@ function cm.initial_effect(c)
e9:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e9:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e9:SetProperty(EFFECT_FLAG_DELAY) e9:SetProperty(EFFECT_FLAG_DELAY)
e9:SetCode(EVENT_SPSUMMON_SUCCESS) e9:SetCode(EVENT_SPSUMMON_SUCCESS)
e9:SetRange(LOCATION_FZONE) e9:SetRange(LOCATION_SZONE)
e9:SetCountLimit(1,EFFECT_COUNT_CODE_CHAIN) e9:SetCountLimit(1,EFFECT_COUNT_CODE_CHAIN)
e9:SetCondition(cm.pcon) e9:SetCondition(cm.pcon)
e9:SetTarget(cm.ptg) e9:SetTarget(cm.ptg)
......
...@@ -11,7 +11,7 @@ function cm.initial_effect(c) ...@@ -11,7 +11,7 @@ function cm.initial_effect(c)
e9:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e9:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e9:SetProperty(EFFECT_FLAG_DELAY) e9:SetProperty(EFFECT_FLAG_DELAY)
e9:SetCode(EVENT_TO_GRAVE) e9:SetCode(EVENT_TO_GRAVE)
e9:SetRange(LOCATION_FZONE) e9:SetRange(LOCATION_SZONE)
e9:SetCountLimit(1,EFFECT_COUNT_CODE_CHAIN) e9:SetCountLimit(1,EFFECT_COUNT_CODE_CHAIN)
e9:SetCondition(cm.pcon) e9:SetCondition(cm.pcon)
e9:SetTarget(cm.ptg) e9:SetTarget(cm.ptg)
......
...@@ -11,7 +11,7 @@ function cm.initial_effect(c) ...@@ -11,7 +11,7 @@ function cm.initial_effect(c)
e9:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e9:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e9:SetProperty(EFFECT_FLAG_DELAY) e9:SetProperty(EFFECT_FLAG_DELAY)
e9:SetCode(EVENT_MOVE) e9:SetCode(EVENT_MOVE)
e9:SetRange(LOCATION_FZONE) e9:SetRange(LOCATION_SZONE)
e9:SetCountLimit(1,EFFECT_COUNT_CODE_CHAIN) e9:SetCountLimit(1,EFFECT_COUNT_CODE_CHAIN)
e9:SetCondition(cm.pcon) e9:SetCondition(cm.pcon)
e9:SetTarget(cm.ptg) e9:SetTarget(cm.ptg)
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
Duel.LoadScript("c60010000.lua") Duel.LoadScript("c60010000.lua")
local cm,m,o=GetID() local cm,m,o=GetID()
function cm.initial_effect(c) function cm.initial_effect(c)
MTC.LHini(c) --MTC.LHini(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
...@@ -18,6 +18,26 @@ function cm.initial_effect(c) ...@@ -18,6 +18,26 @@ function cm.initial_effect(c)
e1:SetRange(LOCATION_FZONE) e1:SetRange(LOCATION_FZONE)
e1:SetOperation(cm.thop) e1:SetOperation(cm.thop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
if not cst==true then
cst=true
--local tp=c:GetOwner()
--spsm
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetCondition(cm.LHcon1)
e1:SetOperation(cm.LHop1)
Duel.RegisterEffect(e1,0)
--spsm
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetCondition(cm.LHcon1)
e1:SetOperation(cm.LHop1)
Duel.RegisterEffect(e1,0)
end
end end
function cm.filter(c) function cm.filter(c)
return c:IsSetCard(0x630) and c:IsAbleToHand() and not c:IsCode(m) return c:IsSetCard(0x630) and c:IsAbleToHand() and not c:IsCode(m)
...@@ -52,3 +72,21 @@ end ...@@ -52,3 +72,21 @@ end
function cm.filter2(c) function cm.filter2(c)
return c:IsCode(60010003) and c:IsAbleToHand() return c:IsCode(60010003) and c:IsAbleToHand()
end end
function cm.LHfil1(c,tp)
return c:IsSummonPlayer(tp) and c:IsSetCard(0x630)
end
function cm.LHcon1(e,tp,eg,ep,ev,re,r,rp)
local tp=eg:GetFirst():GetOwner()
return eg:IsExists(cm.LHfil1,1,nil,tp)
end
function cm.LHop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=eg:GetFirst()
while tc do
if tc:IsSetCard(0x630) then
Duel.RegisterFlagEffect(tc:GetSummonPlayer(),60010002,RESET_PHASE+PHASE_END,0,1)
Duel.RaiseEvent(c,EVENT_CUSTOM+60010002,nil,0,tc:GetSummonPlayer(),tc:GetSummonPlayer(),0)
end
tc=eg:GetNext()
end
end
\ No newline at end of file
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
Duel.LoadScript("c60010000.lua") Duel.LoadScript("c60010000.lua")
local cm,m,o=GetID() local cm,m,o=GetID()
function cm.initial_effect(c) function cm.initial_effect(c)
MTC.LHini(c) --MTC.LHini(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
...@@ -11,6 +11,26 @@ function cm.initial_effect(c) ...@@ -11,6 +11,26 @@ function cm.initial_effect(c)
e1:SetTarget(cm.target) e1:SetTarget(cm.target)
e1:SetOperation(cm.activate) e1:SetOperation(cm.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
if not cst==true then
cst=true
--local tp=c:GetOwner()
--spsm
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetCondition(cm.LHcon1)
e1:SetOperation(cm.LHop1)
Duel.RegisterEffect(e1,0)
--spsm
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetCondition(cm.LHcon1)
e1:SetOperation(cm.LHop1)
Duel.RegisterEffect(e1,0)
end
end end
function cm.filter(c,e,tp) function cm.filter(c,e,tp)
return c:IsSetCard(0x630) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x630) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
...@@ -21,12 +41,15 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -21,12 +41,15 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end end
function cm.activate(e,tp,eg,ep,ev,re,r,rp) function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
Duel.BreakEffect()
local ti=MTC.LHnum(tp) local ti=MTC.LHnum(tp)
Debug.Message(ti)
if ti~=0 and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) then if ti~=0 and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) then
local ti=math.min(ti,Duel.GetLocationCount(tp,LOCATION_MZONE)) local ti=math.min(ti,Duel.GetLocationCount(tp,LOCATION_MZONE))
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
...@@ -37,3 +60,21 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -37,3 +60,21 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
end end
end end
end end
function cm.LHfil1(c,tp)
return c:IsSummonPlayer(tp) and c:IsSetCard(0x630)
end
function cm.LHcon1(e,tp,eg,ep,ev,re,r,rp)
local tp=eg:GetFirst():GetOwner()
return eg:IsExists(cm.LHfil1,1,nil,tp)
end
function cm.LHop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=eg:GetFirst()
while tc do
if tc:IsSetCard(0x630) then
Duel.RegisterFlagEffect(tc:GetSummonPlayer(),60010002,RESET_PHASE+PHASE_END,0,1)
Duel.RaiseEvent(c,EVENT_CUSTOM+60010002,nil,0,tc:GetSummonPlayer(),tc:GetSummonPlayer(),0)
end
tc=eg:GetNext()
end
end
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
Duel.LoadScript("c60010000.lua") Duel.LoadScript("c60010000.lua")
local cm,m,o=GetID() local cm,m,o=GetID()
function cm.initial_effect(c) function cm.initial_effect(c)
MTC.LHini(c) --MTC.LHini(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
...@@ -11,6 +11,26 @@ function cm.initial_effect(c) ...@@ -11,6 +11,26 @@ function cm.initial_effect(c)
e1:SetTarget(cm.target) e1:SetTarget(cm.target)
e1:SetOperation(cm.activate) e1:SetOperation(cm.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
if not cst==true then
cst=true
--local tp=c:GetOwner()
--spsm
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetCondition(cm.LHcon1)
e1:SetOperation(cm.LHop1)
Duel.RegisterEffect(e1,0)
--spsm
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetCondition(cm.LHcon1)
e1:SetOperation(cm.LHop1)
Duel.RegisterEffect(e1,0)
end
end end
function cm.filter(c,e,tp) function cm.filter(c,e,tp)
return c:IsSetCard(0x630) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x630) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
...@@ -26,6 +46,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -26,6 +46,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
Duel.BreakEffect()
local ti=MTC.LHnum(tp) local ti=MTC.LHnum(tp)
if ti~=0 and Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_DECK,1,nil) then if ti~=0 and Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_DECK,1,nil) then
local ti=math.min(ti,Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)) local ti=math.min(ti,Duel.GetFieldGroupCount(tp,0,LOCATION_DECK))
...@@ -36,3 +57,21 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -36,3 +57,21 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
end end
end end
end end
function cm.LHfil1(c,tp)
return c:IsSummonPlayer(tp) and c:IsSetCard(0x630)
end
function cm.LHcon1(e,tp,eg,ep,ev,re,r,rp)
local tp=eg:GetFirst():GetOwner()
return eg:IsExists(cm.LHfil1,1,nil,tp)
end
function cm.LHop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=eg:GetFirst()
while tc do
if tc:IsSetCard(0x630) then
Duel.RegisterFlagEffect(tc:GetSummonPlayer(),60010002,RESET_PHASE+PHASE_END,0,1)
Duel.RaiseEvent(c,EVENT_CUSTOM+60010002,nil,0,tc:GetSummonPlayer(),tc:GetSummonPlayer(),0)
end
tc=eg:GetNext()
end
end
\ No newline at end of file
...@@ -2,18 +2,38 @@ ...@@ -2,18 +2,38 @@
Duel.LoadScript("c60010000.lua") Duel.LoadScript("c60010000.lua")
local cm,m,o=GetID() local cm,m,o=GetID()
function cm.initial_effect(c) function cm.initial_effect(c)
MTC.LHini(c) --MTC.LHini(c)
MTC.LHSpS(c,2) MTC.LHSpS(c,2)
--search --search
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,0)) e3:SetDescription(aux.Stringid(m,0))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_IGNITION) e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1) e3:SetCountLimit(1)
e3:SetTarget(cm.thtg) e3:SetTarget(cm.thtg)
e3:SetOperation(cm.thop) e3:SetOperation(cm.thop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
if not cst==true then
cst=true
--local tp=c:GetOwner()
--spsm
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetCondition(cm.LHcon1)
e1:SetOperation(cm.LHop1)
Duel.RegisterEffect(e1,0)
--spsm
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetCondition(cm.LHcon1)
e1:SetOperation(cm.LHop1)
Duel.RegisterEffect(e1,0)
end
end end
function cm.thfil(c) function cm.thfil(c)
return not c:IsCode(m) and c:IsAbleToHand() return not c:IsCode(m) and c:IsAbleToHand()
...@@ -30,7 +50,26 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -30,7 +50,26 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
local ti=MTC.LHnum(tp)*200 local ti=MTC.LHnum(tp)*300
Duel.Damage(1-tp,ti,REASON_EFFECT) Duel.Recover(tp,ti,REASON_EFFECT)
end
end
function cm.LHfil1(c,tp)
return c:IsSummonPlayer(tp) and c:IsSetCard(0x630)
end
function cm.LHcon1(e,tp,eg,ep,ev,re,r,rp)
local tp=eg:GetFirst():GetOwner()
return eg:IsExists(cm.LHfil1,1,nil,tp)
end
function cm.LHop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=eg:GetFirst()
while tc do
if tc:IsSetCard(0x630) then
Duel.RegisterFlagEffect(tc:GetSummonPlayer(),60010002,RESET_PHASE+PHASE_END,0,1)
--Debug.Message(Duel.GetFlagEffect(tp,60010002))
Duel.RaiseEvent(c,EVENT_CUSTOM+60010002,nil,0,tc:GetSummonPlayer(),tc:GetSummonPlayer(),0)
end
tc=eg:GetNext()
end end
end end
\ No newline at end of file
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
Duel.LoadScript("c60010000.lua") Duel.LoadScript("c60010000.lua")
local cm,m,o=GetID() local cm,m,o=GetID()
function cm.initial_effect(c) function cm.initial_effect(c)
MTC.LHini(c) --MTC.LHini(c)
MTC.LHSpS(c,2) MTC.LHSpS(c,2)
--search --search
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
...@@ -14,8 +14,8 @@ function cm.initial_effect(c) ...@@ -14,8 +14,8 @@ function cm.initial_effect(c)
e3:SetTarget(cm.thtg) e3:SetTarget(cm.thtg)
e3:SetOperation(cm.thop) e3:SetOperation(cm.thop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
if not cm.LHini==true then if not cst==true then
cm.LHini=true cst=true
--local tp=c:GetOwner() --local tp=c:GetOwner()
--spsm --spsm
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
...@@ -24,7 +24,7 @@ function cm.initial_effect(c) ...@@ -24,7 +24,7 @@ function cm.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetCondition(cm.LHcon1) e1:SetCondition(cm.LHcon1)
e1:SetOperation(cm.LHop1) e1:SetOperation(cm.LHop1)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,0)
--spsm --spsm
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
...@@ -32,7 +32,7 @@ function cm.initial_effect(c) ...@@ -32,7 +32,7 @@ function cm.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetCondition(cm.LHcon1) e1:SetCondition(cm.LHcon1)
e1:SetOperation(cm.LHop1) e1:SetOperation(cm.LHop1)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,0)
end end
end end
function cm.thfil(c) function cm.thfil(c)
...@@ -58,7 +58,8 @@ function cm.LHfil1(c,tp) ...@@ -58,7 +58,8 @@ function cm.LHfil1(c,tp)
return c:IsSummonPlayer(tp) and c:IsSetCard(0x630) return c:IsSummonPlayer(tp) and c:IsSetCard(0x630)
end end
function cm.LHcon1(e,tp,eg,ep,ev,re,r,rp) function cm.LHcon1(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(MTC.LHfil1,1,nil,tp) local tp=eg:GetFirst():GetOwner()
return eg:IsExists(cm.LHfil1,1,nil,tp)
end end
function cm.LHop1(e,tp,eg,ep,ev,re,r,rp) function cm.LHop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -14,8 +14,8 @@ function cm.initial_effect(c) ...@@ -14,8 +14,8 @@ function cm.initial_effect(c)
e3:SetTarget(cm.thtg) e3:SetTarget(cm.thtg)
e3:SetOperation(cm.thop) e3:SetOperation(cm.thop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
if not cm.LHini==true then if not cst==true then
cm.LHini=true cst=true
--local tp=c:GetOwner() --local tp=c:GetOwner()
--spsm --spsm
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
...@@ -24,7 +24,7 @@ function cm.initial_effect(c) ...@@ -24,7 +24,7 @@ function cm.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetCondition(cm.LHcon1) e1:SetCondition(cm.LHcon1)
e1:SetOperation(cm.LHop1) e1:SetOperation(cm.LHop1)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,0)
--spsm --spsm
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
...@@ -32,7 +32,7 @@ function cm.initial_effect(c) ...@@ -32,7 +32,7 @@ function cm.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetCondition(cm.LHcon1) e1:SetCondition(cm.LHcon1)
e1:SetOperation(cm.LHop1) e1:SetOperation(cm.LHop1)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,0)
end end
end end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
...@@ -55,7 +55,8 @@ function cm.LHfil1(c,tp) ...@@ -55,7 +55,8 @@ function cm.LHfil1(c,tp)
return c:IsSummonPlayer(tp) and c:IsSetCard(0x630) return c:IsSummonPlayer(tp) and c:IsSetCard(0x630)
end end
function cm.LHcon1(e,tp,eg,ep,ev,re,r,rp) function cm.LHcon1(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(MTC.LHfil1,1,nil,tp) local tp=eg:GetFirst():GetOwner()
return eg:IsExists(cm.LHfil1,1,nil,tp)
end end
function cm.LHop1(e,tp,eg,ep,ev,re,r,rp) function cm.LHop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -17,8 +17,8 @@ function cm.initial_effect(c) ...@@ -17,8 +17,8 @@ function cm.initial_effect(c)
local e2=e1:Clone() local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2) c:RegisterEffect(e2)
if not cm.LHini==true then if not cst==true then
cm.LHini=true cst=true
--local tp=c:GetOwner() --local tp=c:GetOwner()
--spsm --spsm
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
...@@ -27,7 +27,7 @@ function cm.initial_effect(c) ...@@ -27,7 +27,7 @@ function cm.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetCondition(cm.LHcon1) e1:SetCondition(cm.LHcon1)
e1:SetOperation(cm.LHop1) e1:SetOperation(cm.LHop1)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,0)
--spsm --spsm
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
...@@ -35,24 +35,25 @@ function cm.initial_effect(c) ...@@ -35,24 +35,25 @@ function cm.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetCondition(cm.LHcon1) e1:SetCondition(cm.LHcon1)
e1:SetOperation(cm.LHop1) e1:SetOperation(cm.LHop1)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,0)
end end
end end
function cm.tdfilter(c) function cm.tdfilter(c)
return c:IsSetCard(0x630) and c:IsAbleToHand() return c:IsSetCard(0x630) and c:IsAbleToHand()
end end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
--local tp=e:GetHandlerPlayer()
if chk==0 then if chk==0 then
local num=Duel.GetFlagEffect(tp,60010002) local num=Duel.GetFlagEffect(tp,60010002)
--Debug.Message(num)
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<num then return false end if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<num then return false end
local g=Duel.GetDecktopGroup(tp,num) local g=Duel.GetDecktopGroup(tp,num)
local result=g:FilterCount(Card.IsAbleToHand,nil)>0 local result=g:FilterCount(Card.IsAbleToHand,nil)>0
return result return result
end end
Duel.SetTargetPlayer(tp)
end end
function cm.thop(e,tp,eg,ep,ev,re,r,rp) function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) --local tp=e:GetHandlerPlayer()
local num=Duel.GetFlagEffect(p,60010002) local num=Duel.GetFlagEffect(p,60010002)
Duel.ConfirmDecktop(p,num) Duel.ConfirmDecktop(p,num)
local g=Duel.GetDecktopGroup(p,num) local g=Duel.GetDecktopGroup(p,num)
...@@ -78,7 +79,8 @@ function cm.LHfil1(c,tp) ...@@ -78,7 +79,8 @@ function cm.LHfil1(c,tp)
return c:IsSummonPlayer(tp) and c:IsSetCard(0x630) return c:IsSummonPlayer(tp) and c:IsSetCard(0x630)
end end
function cm.LHcon1(e,tp,eg,ep,ev,re,r,rp) function cm.LHcon1(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(MTC.LHfil1,1,nil,tp) local tp=eg:GetFirst():GetOwner()
return eg:IsExists(cm.LHfil1,1,nil,tp)
end end
function cm.LHop1(e,tp,eg,ep,ev,re,r,rp) function cm.LHop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -17,8 +17,8 @@ function cm.initial_effect(c) ...@@ -17,8 +17,8 @@ function cm.initial_effect(c)
local e2=e1:Clone() local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2) c:RegisterEffect(e2)
if not cm.LHini==true then if not cst==true then
cm.LHini=true cst=true
--local tp=c:GetOwner() --local tp=c:GetOwner()
--spsm --spsm
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
...@@ -27,7 +27,7 @@ function cm.initial_effect(c) ...@@ -27,7 +27,7 @@ function cm.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetCondition(cm.LHcon1) e1:SetCondition(cm.LHcon1)
e1:SetOperation(cm.LHop1) e1:SetOperation(cm.LHop1)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,0)
--spsm --spsm
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
...@@ -35,18 +35,19 @@ function cm.initial_effect(c) ...@@ -35,18 +35,19 @@ function cm.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetCondition(cm.LHcon1) e1:SetCondition(cm.LHcon1)
e1:SetOperation(cm.LHop1) e1:SetOperation(cm.LHop1)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,0)
end end
end end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_GRAVE,0)~=0 and Duel.IsPlayerCanDraw(tp) end if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_GRAVE,0)~=0 and Duel.IsPlayerCanDraw(tp) end
end end
function cm.thop(e,tp,eg,ep,ev,re,r,rp) function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local tp=e:GetHandlerPlayer()
local num=math.min(Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)*5,Duel.GetFlagEffect(tp,60010002)) local num=math.min(Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)*5,Duel.GetFlagEffect(tp,60010002))
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local bg=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_GRAVE,0,0,num,nil) local bg=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_GRAVE,0,0,num,nil)
if Duel.SendtoDeck(bg,nil,2,REASON_EFFECT) then if Duel.SendtoDeck(bg,nil,2,REASON_EFFECT) then
local tb=Duel.GetOperatedGroup():Filter(Card.IsLocation,nil,LOCATION_DECK) local tb=Duel.GetOperatedGroup():Filter(Card.IsLocation,nil,LOCATION_DECK):GetCount()
local ti=0 local ti=0
while tb>=5 do while tb>=5 do
tb=tb-5 tb=tb-5
...@@ -61,7 +62,8 @@ function cm.LHfil1(c,tp) ...@@ -61,7 +62,8 @@ function cm.LHfil1(c,tp)
return c:IsSummonPlayer(tp) and c:IsSetCard(0x630) return c:IsSummonPlayer(tp) and c:IsSetCard(0x630)
end end
function cm.LHcon1(e,tp,eg,ep,ev,re,r,rp) function cm.LHcon1(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(MTC.LHfil1,1,nil,tp) local tp=eg:GetFirst():GetOwner()
return eg:IsExists(cm.LHfil1,1,nil,tp)
end end
function cm.LHop1(e,tp,eg,ep,ev,re,r,rp) function cm.LHop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -22,8 +22,8 @@ function cm.initial_effect(c) ...@@ -22,8 +22,8 @@ function cm.initial_effect(c)
e3:GetCondition(cm.con) e3:GetCondition(cm.con)
e3:SetValue(cm.efilter) e3:SetValue(cm.efilter)
c:RegisterEffect(e3) c:RegisterEffect(e3)
if not cm.LHini==true then if not cst==true then
cm.LHini=true cst=true
--local tp=c:GetOwner() --local tp=c:GetOwner()
--spsm --spsm
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
...@@ -32,7 +32,7 @@ function cm.initial_effect(c) ...@@ -32,7 +32,7 @@ function cm.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetCondition(cm.LHcon1) e1:SetCondition(cm.LHcon1)
e1:SetOperation(cm.LHop1) e1:SetOperation(cm.LHop1)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,0)
--spsm --spsm
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
...@@ -40,7 +40,7 @@ function cm.initial_effect(c) ...@@ -40,7 +40,7 @@ function cm.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetCondition(cm.LHcon1) e1:SetCondition(cm.LHcon1)
e1:SetOperation(cm.LHop1) e1:SetOperation(cm.LHop1)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,0)
end end
end end
function cm.efilter(e,re) function cm.efilter(e,re)
...@@ -53,7 +53,8 @@ function cm.LHfil1(c,tp) ...@@ -53,7 +53,8 @@ function cm.LHfil1(c,tp)
return c:IsSummonPlayer(tp) and c:IsSetCard(0x630) return c:IsSummonPlayer(tp) and c:IsSetCard(0x630)
end end
function cm.LHcon1(e,tp,eg,ep,ev,re,r,rp) function cm.LHcon1(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(MTC.LHfil1,1,nil,tp) local tp=eg:GetFirst():GetOwner()
return eg:IsExists(cm.LHfil1,1,nil,tp)
end end
function cm.LHop1(e,tp,eg,ep,ev,re,r,rp) function cm.LHop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -3,7 +3,7 @@ local cm,m,o=GetID() ...@@ -3,7 +3,7 @@ local cm,m,o=GetID()
function cm.initial_effect(c) function cm.initial_effect(c)
--spsummon --spsummon
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,0)) e3:SetDescription(aux.Stringid(m,0))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_LEAVE_FIELD) e3:SetCode(EVENT_LEAVE_FIELD)
......
...@@ -60,7 +60,7 @@ function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -60,7 +60,7 @@ function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end end
function cm.thop(e,tp,eg,ep,ev,re,r,rp) function cm.thop(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_FZONE,0,1,nil) and Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_ONFIELD,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(m,0)) end if Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_FZONE,0,1,nil) and Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_ONFIELD,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_ONFIELD,nil):Select(tp,1,2,nil) local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_ONFIELD,nil):Select(tp,1,2,nil)
Duel.SendtoGrave(g,REASON_EFFECT) Duel.SendtoGrave(g,REASON_EFFECT)
else else
......
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