Commit a4771c83 authored by TanakaKotoha's avatar TanakaKotoha

rover

parent 4e3d0782
......@@ -37,6 +37,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,0,LOCATION_ONFIELD,1,1,nil)
local tc=g:GetFirst()
if not tc then return end
local bool1=1
if tc:IsCanTurnSet() and not tc:IsType(TYPE_PENDULUM) then
tc:CancelToGrave()
if tc:IsType(TYPE_MONSTER) then
......@@ -44,8 +45,10 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
else
Duel.ChangePosition(tc,POS_FACEDOWN)
end
local g=Duel.GetOperatedGroup()
if #g>0 then bool1=0 end
end
if not tc:IsType(TYPE_TOKEN) and (tc:IsFaceup() or not tc:IsLocation(LOCATION_REMOVED)) then
if not tc:IsType(TYPE_TOKEN) and (tc:IsFaceup() or not tc:IsLocation(LOCATION_REMOVED)) and bool1==1 then
Duel.Remove(tc,POS_FACEDOWN,REASON_RULE)
end
Duel.BreakEffect()
......
......@@ -72,9 +72,11 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_POSITION,eg,eg:GetCount(),0,0)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local bool1=1
local g=eg:Filter(cm.filter,nil,e,tp)
local tc=g:GetFirst()
while tc do
bool1=1
if Duel.GetLocationCount(1-tp,LOCATION_SZONE)>0 and tc:IsCanTurnSet() and not tc:IsType(TYPE_PENDULUM+TYPE_TOKEN) then
if Duel.MoveToField(tc,tp,1-tp,LOCATION_SZONE,POS_FACEDOWN,true)~=0 then
local e1=Effect.CreateEffect(e:GetHandler())
......@@ -84,11 +86,12 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
tc:RegisterEffect(e1)
bool1=0
else
Duel.Remove(tc,POS_FACEDOWN,REASON_RULE)
end
end
if not tc:IsType(TYPE_TOKEN) and (tc:IsFaceup() or not tc:IsLocation(LOCATION_REMOVED)) then
if not tc:IsType(TYPE_TOKEN) and (tc:IsFaceup() or not tc:IsLocation(LOCATION_REMOVED)) and bool1==1 then
Duel.Remove(tc,POS_FACEDOWN,REASON_RULE)
end
tc=g:GetNext()
......
......@@ -96,6 +96,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,function(c) return c:IsFaceup() and not c:IsType(TYPE_TOKEN) end,tp,0,LOCATION_ONFIELD,1,1,nil)
local tc=g:GetFirst()
if not tc then return end
local bool1=1
if tc:IsCanTurnSet() and not tc:IsType(TYPE_PENDULUM) then
tc:CancelToGrave()
if tc:IsType(TYPE_MONSTER) then
......@@ -103,14 +104,11 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
else
Duel.ChangePosition(tc,POS_FACEDOWN)
end
elseif tc:IsType(TYPE_TOKEN) then
return
elseif tc:IsType(TYPE_PENDULUM) then
Duel.Remove(tc,POS_FACEDOWN,REASON_RULE)
elseif tc:IsFaceup() or not tc:IsLocation(LOCATION_REMOVED) then
local g=Duel.GetOperatedGroup()
if #g>0 then bool1=0 end
end
if not tc:IsType(TYPE_TOKEN) and (tc:IsFaceup() or not tc:IsLocation(LOCATION_REMOVED)) and bool1==1 then
Duel.Remove(tc,POS_FACEDOWN,REASON_RULE)
else
return
end
end
function cm.setfilter(c,e,tp)
......
......@@ -9,7 +9,7 @@ function cm.initial_effect(c)
local e2=rsef.SC(c,EVENT_SPSUMMON_SUCCESS,nil,nil,"cd",rscon.sumtype("xyz",cm.cfilter),cm.op)
end
cm.setname="TaleSouls"
function cm.cfilter(e,tp,re,rp,mat)
function cm.cfilter(c,e,tp,re,rp,mat)
return #mat>0 and mat:IsExists(Card.IsCode,1,nil,33350016)
end
function cm.op(e,tp)
......
......@@ -5,6 +5,7 @@ function c33400004.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_COUNTER)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetTarget(c33400004.addct)
e1:SetOperation(c33400004.addc)
......
......@@ -30,7 +30,7 @@ function c33400017.initial_effect(c)
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_DRAW)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_DESTROYED)
e3:SetCountLimit(1,33400017+10000)
e4:SetTarget(c33400017.drtg)
......
......@@ -67,12 +67,14 @@ function c33400037.negop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(eg,REASON_EFFECT)
end
end
if Duel.SelectYesNo(tp,aux.Stringid(33400037,0)) then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(33400037,3))
local tg=Duel.SelectMatchingCard(tp,c33400037.filter,tp,LOCATION_ONFIELD,0,1,1,nil)
local tc=tg:GetFirst()
tc:AddCounter(0x34f,4)
end
if Duel.IsExistingMatchingCard(c33400037.filter,tp,LOCATION_ONFIELD,0,1,nil) then
if Duel.SelectYesNo(tp,aux.Stringid(33400037,0)) then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(33400037,3))
local tg=Duel.SelectMatchingCard(tp,c33400037.filter,tp,LOCATION_ONFIELD,0,1,1,nil)
local tc=tg:GetFirst()
tc:AddCounter(0x34f,4)
end
end
end
function c33400037.filter(c)
return c:IsFaceup() and c:IsCanAddCounter(0x34f,4)
......
......@@ -71,8 +71,8 @@ function c33401201.spcd(e,tp,eg,ep,ev,re,r,rp)
local b=(ct1<ct2)
return not Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) and b
end
function c33401201.cfilter(c)
return c:IsSetCard(0x341) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost()
function c33401201.cfilter(c,e,tp)
return c:IsSetCard(0x341) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost() and Duel.IsExistingTarget(c33401201.filter3,tp,LOCATION_GRAVE,0,1,c,e,tp)
end
function c33401201.splimit(e,c)
return not c:IsSetCard(0x341)
......@@ -88,7 +88,7 @@ function c33401201.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
e1:SetTarget(c33401201.splimit)
Duel.RegisterEffect(e1,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c33401201.cfilter,tp,LOCATION_GRAVE,0,1,1,nil)
local g=Duel.SelectMatchingCard(tp,c33401201.cfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
g:AddCard(e:GetHandler())
Duel.Remove(g,POS_FACEUP,REASON_COST)
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