Commit 0f7e1726 authored by Tachibana's avatar Tachibana

eme

parent 6d70c162
Pipeline #6844 passed with stages
in 27 minutes and 31 seconds
......@@ -2,10 +2,12 @@
local m=12086000
local cm=_G["c"..m]
Duel.LoadScript("c12000000.lua")
if c12086000.checkfpl==nil then
c12086000.checkfpl=true
c12086000.fpl=0
ALSTYE={}
if ALSTYE_check==nil then
ALSTYE_check=true
ALSTYE_fpl=0
end
if not cm then return end
cm.named_with_ALSTYE=true
function cm.initial_effect(c)
--Activate
......@@ -33,8 +35,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e2)
--lv
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCost(aux.bfgcost)
e2:SetOperation(cm.lvop)
......@@ -42,11 +43,11 @@ function cm.initial_effect(c)
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
local tt=Duel.GetTurnCount()%2
return cm.fpl and (cm.fpl+tt)%2==1
return ALSTYE_fpl and (ALSTYE_fpl+tt)%2==1
end
function cm.con1(e,tp,eg,ep,ev,re,r,rp)
local tt=Duel.GetTurnCount()%2
return cm.fpl and (cm.fpl+tt)%2==0
return ALSTYE_fpl and (ALSTYE_fpl+tt)%2==0
end
function cm.filter(c)
return srre.check_set_ALSTYE(c) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
......@@ -65,10 +66,10 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
Duel.BreakEffect()
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,1,nil,e,tp) and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
local sg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
end
......@@ -97,8 +98,8 @@ function cm.desop(e,tp,eg,ep,ev,re,r,rp)
end
end
function cm.hlvop(e,tp,eg,ep,ev,re,r,rp)
if cm.fpl then
if cm.fpl==0 then cm.fpl=1 end
if cm.fpl==1 then cm.fpl=0 end
if ALSTYE_fpl then
if ALSTYE_fpl==0 then ALSTYE_fpl=1 end
if ALSTYE_fpl==1 then ALSTYE_fpl=0 end
end
end
......@@ -65,10 +65,10 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SendtoHand(c,nil,REASON_EFFECT)~=0 then
local tt=Duel.GetTurnCount()%2
if cm.fpl and (cm.fpl+tt)%2==1 then
if ALSTYE_fpl and (ALSTYE_fpl+tt)%2==1 then
Duel.Recover(tp,600,REASON_EFFECT)
else
if cm.fpl and (cm.fpl+tt)%2==0 and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then
if ALSTYE_fpl and (ALSTYE_fpl+tt)%2==0 and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then
Duel.ShuffleHand(tp)
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
......@@ -76,5 +76,5 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
end
end
end
\ No newline at end of file
......@@ -56,9 +56,9 @@ function cm.rfilter(c)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SendtoHand(c,nil,REASON_EFFECT)~=0 then
if c:IsRelateToEffect(e) and Duel.SendtoGrave(c,REASON_EFFECT)~=0 then
local tt=Duel.GetTurnCount()%2
if cm.fpl and (cm.fpl+tt)%2==1 then
if ALSTYE_fpl and (ALSTYE_fpl+tt)%2==1 then
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp)
......
......@@ -24,8 +24,8 @@ function cm.initial_effect(c)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetRange(LOCATION_DECK)
e1:SetCountLimit(1,m+100)
e1:SetCondition(cm.spcon)
e1:SetOperation(cm.spop)
e1:SetCondition(cm.spcon1)
e1:SetOperation(cm.spop1)
e1:SetValue(1)
c:RegisterEffect(e1)
--to hand
......@@ -47,7 +47,7 @@ function cm.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local tt=Duel.GetTurnCount()%2
return cm.fpl and (cm.fpl+tt)%2==1 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
return ALSTYE_fpl and (ALSTYE_fpl+tt)%2==1 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE,0,1,nil)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp,c)
......@@ -58,13 +58,14 @@ end
function cm.spfilter1(c)
return srre.check_set_ALSTYE(c) and c:IsDiscardable()
end
function cm.spcon(e,c)
function cm.spcon1(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
local tt=Duel.GetTurnCount()%2
return ALSTYE_fpl and (ALSTYE_fpl+tt)%2==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.spfilter1,tp,LOCATION_HAND,0,1,c)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp,c)
function cm.spop1(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local g=Duel.SelectMatchingCard(tp,cm.spfilter1,tp,LOCATION_HAND,0,1,1,c)
Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD)
......@@ -83,7 +84,8 @@ function cm.setop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetDecktopGroup(tp,5)
if g:GetCount()>0 then
local tt=Duel.GetTurnCount()%2
if cm.fpl and (cm.fpl+tt)%2==1 then
if ALSTYE_fpl and (ALSTYE_fpl+tt)%2==1 then
Debug.Message(1)
local tg=g:FilterSelect(tp,cm.setfilter,1,1,nil,e,tp)
if #tg>0 and Duel.SelectYesNo(tp,aux.Stringid(tp,3)) then
if tg:GetFirst():IsAbleToGrave() and tg:GetFirst():IsAbleToRemove() and Duel.SelectYesNo(tp,aux.Stringid(tp,4)) then
......@@ -97,7 +99,7 @@ function cm.setop(e,tp,eg,ep,ev,re,r,rp)
end
end
end
if cm.fpl and (cm.fpl+tt)%2==0 then
if ALSTYE_fpl and (ALSTYE_fpl+tt)%2==0 then
local tt=g:FilterCount(cm.setfilter,nil)
if tt>0 and Duel.SelectYesNo(tp,aux.Stringid(tp,5)) then
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,tt,nil)
......
......@@ -53,7 +53,7 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SendtoHand(c,nil,REASON_EFFECT)~=0 then
local tt=Duel.GetTurnCount()%2
if cm.fpl and (cm.fpl+tt)%2==1 then
if ALSTYE_fpl and (ALSTYE_fpl+tt)%2==1 then
if Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_GRAVE,0,1,nil) and Duel.IsExistingMatchingCard(cm.filter,tp,0,LOCATION_GRAVE,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g1=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_GRAVE,0,1,1,nil)
......
......@@ -114,17 +114,17 @@ function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SendtoHand(c,nil,REASON_EFFECT)~=0 then
if c:IsRelateToEffect(e) and Duel.SendtoGrave(c,REASON_EFFECT)~=0 then
local tt=Duel.GetTurnCount()%2
if cm.fpl and (cm.fpl+tt)%2==1 then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CHANGE_BATTLE_DAMAGE)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetTargetRange(1,0)
e3:SetValue(HALF_DAMAGE)
e3:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e3,tp)
if ALSTYE_fpl and (ALSTYE_fpl+tt)%2==1 then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CHANGE_BATTLE_DAMAGE)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetTargetRange(1,0)
e3:SetValue(HALF_DAMAGE)
e3:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e3,tp)
else
if Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)>0 then
local g=Duel.GetMatchingGroup(nil,1-tp,LOCATION_MZONE,0,nil)
......
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