Commit 910b599e authored by VanillaSalt's avatar VanillaSalt

fix script

parent 8ed1c3d0
......@@ -20,7 +20,7 @@ function c11747708.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c11747708.costfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c11747708.costfilter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler())
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
Duel.Remove(g,POS_FACEUP,REASON_COST)
e:SetLabel(g:GetFirst():GetLevel())
end
function c11747708.target(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -23,7 +23,7 @@ function c12183332.operation(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local opt=Duel.SelectOption(tp,aux.Stringid(12183332,1),aux.Stringid(12183332,2))
if opt==0 then
Duel.ShuffleDeck(1-tp)
Duel.ShuffleDeck(tp)
else
Duel.ShuffleDeck(1-tp)
end
......
......@@ -41,7 +41,6 @@ function c1281505.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
and Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c1281505.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
......@@ -2,7 +2,7 @@
function c14001430.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_POSITION)
e1:SetCategory(CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c14001430.target)
......@@ -30,14 +30,15 @@ function c14001430.initial_effect(c)
c:RegisterEffect(e4)
end
function c14001430.tdfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x71)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x71) and c:IsAbleToDeck()
end
function c14001430.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local g=Duel.GetMatchingGroup(c14001430.tdfilter,tp,LOCATION_GRAVE,0,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
end
function c14001430.activate(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(c14001430.tdfilter,tp,LOCATION_GRAVE,0,nil)
if g:GetCount()>0 then
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
......@@ -53,6 +54,7 @@ function c14001430.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=eg:Filter(c14001430.repfilter,nil,tp)
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
return true
else return false end
end
function c14001430.repval(e,c)
......
......@@ -69,7 +69,7 @@ end
function c15187079.ctcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,nil,1,e:GetHandler()) end
local g=Duel.SelectReleaseGroup(tp,nil,1,1,e:GetHandler())
Duel.Release(g,REASON_EFFECT)
Duel.Release(g,REASON_COST)
end
function c15187079.filter(c)
return c:IsFaceup() and c:IsAbleToChangeControler()
......
......@@ -30,7 +30,7 @@ end
function c176392.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:IsExists(c176392.rfilter,1,nil,e:GetHandler()) end
if Duel.SelectYesNo(tp,aux.Stringid(176392,0)) then
Duel.Destroy(e:GetHandler(),REASON_EFFECT)
Duel.Destroy(e:GetHandler(),REASON_EFFECT+REASON_REPLACE)
return true
else return false end
end
......
......@@ -8,6 +8,7 @@ function c1801154.initial_effect(c)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(1801154,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_SZONE)
......
......@@ -3,7 +3,6 @@ function c18489208.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(18489208,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_BATTLE_DESTROYED)
......
......@@ -19,7 +19,7 @@ function c18816758.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c18816758.cfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectMatchingCard(tp,c18816758.cfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.SendtoHand(g,nil,REASON_COST)
end
function c18816758.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and chkc:IsDestructable() end
......
......@@ -23,7 +23,7 @@ function c191749.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local tc3=Duel.GetFirstMatchingCard(c191749.cfilter,tp,LOCATION_GRAVE,0,nil,37318031)
local tc4=Duel.GetFirstMatchingCard(c191749.cfilter,tp,LOCATION_GRAVE,0,nil,63703130)
local g=Group.FromCards(tc1,tc2,tc3,tc4)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c191749.filter(c,e,tp)
return c:IsSetCard(0x3008) and c:IsType(TYPE_NORMAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
......@@ -46,7 +46,7 @@ function c1992816.olcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetOverlayCount()==0
end
function c1992816.oltg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATINO_GRAVE) and chkc:IsControler(tp) and chkc:IsType(TYPE_MONSTER) end
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and chkc:IsType(TYPE_MONSTER) end
if chk==0 then return Duel.IsExistingTarget(Card.IsType,tp,LOCATION_GRAVE,0,2,nil,TYPE_MONSTER) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,Card.IsType,tp,LOCATION_GRAVE,0,2,2,nil,TYPE_MONSTER)
......
......@@ -18,7 +18,7 @@ function c19932396.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c19932396.cfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectMatchingCard(tp,c19932396.cfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.SendtoHand(g,nil,REASON_COST)
end
function c19932396.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
......
......@@ -60,7 +60,7 @@ function c21954587.thfilter(c)
end
function c21954587.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c21954587.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATIOn_DECK)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c21954587.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
......
......@@ -32,8 +32,9 @@ function c22666164.filter(c,e,tp)
return c:IsCode(58054262) and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
end
function c22666164.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c22666164.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_HAND+LOCATION_DECK)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-3
Duel.IsExistingMatchingCard(c22666164.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK)
end
function c22666164.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
......
......@@ -78,7 +78,7 @@ function c24096228.operation(e,tp,eg,ep,ev,re,r,rp)
if bit.band(tpe,TYPE_FIELD)~=0 then
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
end
if co then tg(e,tp,eg,ep,ev,re,r,rp,1) end
if co then co(e,tp,eg,ep,ev,re,r,rp,1) end
if tg then tg(e,tp,eg,ep,ev,re,r,rp,1) end
Duel.BreakEffect()
if op then op(e,tp,eg,ep,ev,re,r,rp) end
......
......@@ -46,7 +46,7 @@ end
function c26016357.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.SendtoHand(tc,nil,REASON_EFFET)
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
end
......@@ -39,7 +39,7 @@ function c26732909.checkop1(e,tp,eg,ep,ev,re,r,rp)
end
function c26732909.checkop2(e,tp,eg,ep,ev,re,r,rp)
if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsSetCard(0x106e) then
c26732909[rp]=c26732909[rp]+1
c26732909[rp]=c26732909[rp]-1
end
end
function c26732909.clear(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -2,7 +2,6 @@
function c26864586.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
......
......@@ -3,7 +3,7 @@ function c28297833.initial_effect(c)
--atkup
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(28297833,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_ATKCHANGE)
e1:SetCategory(CATEGORY_TODECK+CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetTarget(c28297833.tdtg)
......@@ -21,7 +21,7 @@ function c28297833.initial_effect(c)
end
function c28297833.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,PLAYER_ALL,LOCATION_REMOVED)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,PLAYER_ALL,LOCATION_REMOVED)
end
function c28297833.tdop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
......@@ -30,7 +30,7 @@ function c32485518.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingTarget(c32485518.filter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c32485518.filter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0)
end
function c32485518.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
......
......@@ -38,14 +38,14 @@ function c34103656.lvop(e,tp,eg,ep,ev,re,r,rp)
e1:SetRange(LOCATION_SZONE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(c34103656.lvtg)
e1:SetValue(c35220244.lvval)
e1:SetValue(c34103656.lvval)
e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
end
function c35220244.cfilter(c)
function c34103656.cfilter(c)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_WATER)
end
function c35220244.lvval(e,c)
return Duel.GetMatchingGroupCount(c35220244.cfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,nil)
function c34103656.lvval(e,c)
return Duel.GetMatchingGroupCount(c34103656.cfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,nil)
end
......@@ -14,7 +14,7 @@ function c34707034.filter(c,e,tp)
return c:IsSetCard(0x74) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c34707034.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler() and c34707034.filter(chkc,e,tp) end
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c34707034.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>2
and Duel.IsExistingTarget(c34707034.filter,tp,LOCATION_GRAVE,0,3,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
......
......@@ -39,7 +39,7 @@ function c39712330.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
and Duel.SelectYesNo(tp,aux.Stringid(39712330,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c39712330.cfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
Duel.Remove(g,POS_FACEUP,REASON_COST)
e:SetLabel(1)
end
end
......@@ -71,7 +71,7 @@ function c39712330.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c39712330.cfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c39712330.cfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c39712330.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
......
......@@ -48,7 +48,7 @@ function c40189917.damcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c40189917.cfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c40189917.cfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
Duel.Remove(g,POS_FACEUP,REASON_COST)
e:SetLabel(g:GetFirst():GetAttack())
end
function c40189917.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -2,7 +2,6 @@
function c40555959.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetOperation(c40555959.activate)
......
......@@ -2,7 +2,6 @@
function c42548470.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
......
......@@ -16,9 +16,9 @@ end
function c42679662.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c42679662.filter(chkc) end
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,c42679662.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
end
function c42679662.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
......
......@@ -14,6 +14,7 @@ function c47754278.initial_effect(c)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(47754278,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e2:SetCode(EVENT_TO_GRAVE)
......
......@@ -13,7 +13,7 @@ function c51554871.initial_effect(c)
end
function c51554871.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT)
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c51554871.filter(c)
return c:IsFaceup() and c:IsSetCard(0x39)
......
......@@ -2,7 +2,6 @@
function c54094821.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(c54094821.condition)
......
......@@ -6,16 +6,20 @@ function c54359696.initial_effect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetCondition(c54359696.condition)
e1:SetTarget(c54359696.target)
e1:SetOperation(c54359696.operation)
c:RegisterEffect(e1)
end
function c54359696.condition(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsReason(REASON_RETURN)
end
function c54359696.filter(c)
return c:IsSetCard(0x6e) and c:GetLevel()==3 and c:IsAbleToHand()
end
function c54359696.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOAND,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c54359696.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
......
......@@ -30,7 +30,7 @@ function c56839613.filter(c,e,tp)
end
function c56839613.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c56839613.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
......
......@@ -26,7 +26,7 @@ function c57784563.eqcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c57784563.cfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c57784563.cfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c57784563.filter(c)
return c:IsFaceup() and c:IsLevelBelow(4) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsAbleToChangeControler()
......
......@@ -13,7 +13,7 @@ function c58494728.initial_effect(c)
--summon success
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(58494728,1))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetCategory(CATEGORY_TOGRAVE+CATEGORY_RECOVER)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
......@@ -57,7 +57,7 @@ function c58494728.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingTarget(nil,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectTarget(tp,nil,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,1000)
end
function c58494728.operation(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -7,7 +7,6 @@ function c59237154.initial_effect(c)
--shuffle
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(59237154,0))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1)
......@@ -24,7 +23,7 @@ function c59237154.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFacedown,tp,LOCATION_MZONE,0,2,nil) end
end
function c59237154.operation(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) or Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)==0 then return end
if not e:GetHandler():IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(Card.IsFacedown,tp,LOCATION_MZONE,0,nil)
Duel.ShuffleSetCard(g)
end
......@@ -15,7 +15,7 @@ function c5990062.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetFieldGroup(tp,LOCATION_ONFIELD+LOCATION_HAND,0)
g:RemoveCard(e:GetHandler())
if chk==0 then return g:GetCount()>0 and not g:IsExists(c5990062.cfilter,1,nil) end
Duel.SendtoGrave(g,REASON_EFFECT)
Duel.SendtoGrave(g,REASON_COST)
end
function c5990062.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetDecktopGroup(tp,1)
......
......@@ -35,7 +35,7 @@ function c60316373.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function c60316373.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SendtoHand(tc,nil,REASON_EFEFCT)>0 then
if tc:IsRelateToEffect(e) and Duel.SendtoHand(tc,nil,REASON_EFFECT)>0 then
Duel.ConfirmCards(1-tp,tc)
end
end
......@@ -21,7 +21,7 @@ function c60718396.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c60718396.cfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c60718396.cfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c60718396.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
......
......@@ -30,6 +30,7 @@ function c62473983.initial_effect(c)
c:RegisterEffect(e5)
--summon success
local e6=Effect.CreateEffect(c)
e6:SetCategory(CATEGORY_SPECIAL_SUMMON)
e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e6:SetCode(EVENT_SUMMON_SUCCESS)
e6:SetCondition(c62473983.spcon)
......
......@@ -3,6 +3,7 @@ function c62757079.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(62757079,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
......
......@@ -17,6 +17,7 @@ function c63211608.initial_effect(c)
--special summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(63211608,0))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_CHAIN_END)
......
......@@ -3,7 +3,7 @@ function c67270095.initial_effect(c)
--pos
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(67270095,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetCategory(CATEGORY_POSITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
......
......@@ -16,7 +16,7 @@ function c67328336.initial_effect(c)
c:RegisterEffect(e2)
--search
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e3:SetDescription(aux.Stringid(67328336,0))
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
......
......@@ -2,7 +2,7 @@
function c68815401.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,0x1c0)
......@@ -34,6 +34,8 @@ function c68815401.target(e,tp,eg,ep,ev,re,r,rp,chk)
local dg2=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
dg1:Merge(dg2)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,dg1,dg1:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c68815401.activate(e,tp,eg,ep,ev,re,r,rp)
local dg1=Duel.GetMatchingGroup(c68815401.filter1,tp,LOCATION_SZONE,0,nil)
......@@ -42,7 +44,7 @@ function c68815401.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.Destroy(dg2,REASON_EFFECT)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,68815402,0,0x4011,1000,1000,3,RACE_PYRO,ATTRIBUTE_FIRE) then
local token=Duel.CreateToken(tp,68815402)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP_ATTACK)
end
end
end
......@@ -22,7 +22,7 @@ function c72278479.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingTarget(c72278479.filter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPPO)
local g=Duel.SelectTarget(tp,c72278479.filter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,0)
end
function c72278479.activate(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -43,7 +43,7 @@ function c72677437.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c72677437.cfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c72677437.cfilter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler())
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c72677437.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
......@@ -40,7 +40,6 @@ function c74064212.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
and Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c74064212.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
......@@ -4,7 +4,6 @@ function c74270067.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetOperation(c74270067.operation)
c:RegisterEffect(e1)
end
......
......@@ -30,7 +30,7 @@ function c74329404.initial_effect(c)
c:RegisterEffect(e4)
end
function c74329404.ctfilter(c,tp)
return c:IsReason(REASON_DESTROY) and c:IsPreviousPosition(POS_FACEUP) and c:GetPreviousControler()==tp
return c:IsReason(REASON_DESTROY) and c:IsPreviousPosition(POS_FACEUP) and c:GetPreviousControler()==tp and c:IsSetCard(0xc008)
end
function c74329404.ctcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c74329404.ctfilter,1,nil,tp)
......@@ -40,10 +40,10 @@ function c74329404.ctop(e,tp,eg,ep,ev,re,r,rp)
end
function c74329404.thcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return Duel.GetTurnPlayer()==tp and (ph==PHASE_MAIN1 or ph==PHASE_MAIN2) --and e:GetHandler():GetCounter(0x1c)>=2
return Duel.GetTurnPlayer()==tp and (ph==PHASE_MAIN1 or ph==PHASE_MAIN2)
end
function c74329404.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() and e:GetHandler():GetCounter(0x1c)>=2 end
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end
function c74329404.filter1(c,e,tp)
......@@ -56,7 +56,7 @@ end
function c74329404.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:IsExists(c74329404.filter1,1,nil,nil,tp) end
Duel.SetTargetCard(eg)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function c74329404.thop(e,tp,eg,ep,ev,re,r,rp)
local g=eg:Filter(c74329404.filter1,nil,e,tp)
......
......@@ -56,8 +56,8 @@ function c74402414.activate(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(c74402414.filter,tp,LOCATION_DECK,0,nil)
if g:GetCount()<5 then return end
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_REMOVE)
local rg=g:Select(1-tp,5,5,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local rg=g:Select(tp,5,5,nil)
Duel.Remove(rg,POS_FACEUP,REASON_EFFECT)
local tc=rg:GetFirst()
while tc do
......@@ -82,11 +82,11 @@ end
function c74402414.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return e:GetLabelObject():IsContains(chkc) and c74402414.thfilter(chkc) end
if chk==0 then return e:GetLabelObject():IsExists(c74402414.thfilter,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=e:GetLabelObject():FilterSelect(tp,c74402414.thfilter,1,1,nil)
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_ATOHAND)
local g=e:GetLabelObject():FilterSelect(1-tp,c74402414.thfilter,1,1,nil)
e:GetLabelObject():Sub(g)
Duel.SetTargetCard(g)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,5,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_REMOVED)
end
function c74402414.thop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
......
......@@ -45,7 +45,6 @@ function c75886890.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
and Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c75886890.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......@@ -72,7 +71,6 @@ function c75886890.eqtg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(75886890,2))
Duel.SelectTarget(tp,c75886890.filter2,tp,LOCATION_GRAVE,0,1,1,nil,e:GetLabelObject())
e:GetLabelObject():CreateEffectRelation(e)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c75886890.eqop2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
......
......@@ -30,7 +30,7 @@ function c76442347.filter(c,e,tp)
or c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN))
end
function c76442347.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c76442347.filter(chkc) end
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c76442347.filter(chkc,e,tp) end
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c76442347.filter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler(),e,tp)
......
......@@ -26,7 +26,7 @@ function c770365.xyzfilter(c)
return c:GetLevel()==5 and c:IsRace(RACE_SPELLCASTER)
end
function c770365.atkval(e,c)
return Duel.GetOverlayCount(tp,1,0)*300
return Duel.GetOverlayCount(c:GetControler(),1,0)*300
end
function c770365.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
......@@ -36,7 +36,7 @@ function c770365.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=5 end
end
function c770365.filter(c)
return c:IsSetCard(0x106e) and c:IsType(TYPE_SPELL)
return c:IsSetCard(0x106e)
end
function c770365.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.ShuffleDeck(tp)
......@@ -44,7 +44,7 @@ function c770365.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetDecktopGroup(tp,5)
local ct=g:FilterCount(c770365.filter,nil)
local sg=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
if ct>0 and g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(770365,1)) then
if ct>0 and sg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(770365,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local dg=sg:Select(tp,1,ct,nil)
Duel.Destroy(dg,REASON_EFFECT)
......
......@@ -17,7 +17,7 @@ end
function c78053598.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,564)
local code=Duel.AnnounceCard(tp)
Duel.Hint(HINT_SELECTMSG,1-tp,ATOHAND)
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(1-tp,c78053598.filter,1-tp,LOCATION_DECK,0,1,1,nil,code)
local tc=g:GetFirst()
if tc then
......
......@@ -2,7 +2,7 @@
function c78864369.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetCategory(CATEGORY_TODECK)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
......
......@@ -17,7 +17,7 @@ function c8041569.descon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetMatchingGroup(Card.IsSetCard,tp,LOCATION_GRAVE,0,nil,0x39):GetClassCount(Card.GetCode)>=3
end
function c8041569.cfilter(c)
return c:IsSetCard(0x39) and c:IsAbleToRemove()
return c:IsSetCard(0x39) and c:IsAbleToRemoveAsCost()
end
function c8041569.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost()
......@@ -25,7 +25,7 @@ function c8041569.descost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c8041569.cfilter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler())
g:AddCard(e:GetHandler())
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c8041569.filter(c)
return c:IsFacedown() and c:IsDestructable()
......
......@@ -3,7 +3,7 @@ function c80441106.initial_effect(c)
--todeck
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(80441106,0))
e1:SetCategory(CATEGORY_DICE+CATEGORY_SPECIAL_SUMMON)
e1:SetCategory(CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_BATTLE_DESTROYED)
......
......@@ -59,7 +59,7 @@ function c8062132.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c8062132.cfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c8062132.cfilter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler())
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c8062132.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
......@@ -3,7 +3,6 @@ function c81020140.initial_effect(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(81020140,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_BATTLE_DESTROYED)
e1:SetCondition(c81020140.condition)
......
......@@ -19,7 +19,7 @@ function c81128478.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c81128478.cfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c81128478.cfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c81128478.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsDestructable() end
......
......@@ -3,7 +3,7 @@ function c8131171.initial_effect(c)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_FIELD)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
e1:SetRange(LOCATION_GRAVE)
e1:SetDescription(aux.Stringid(8131171,0))
......
......@@ -47,7 +47,7 @@ end
function c89521713.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and Duel.SendtoHand(tc,nil,REASON_EFFET)>0 then
if tc:IsRelateToEffect(e) and tc:IsFaceup() and Duel.SendtoHand(tc,nil,REASON_EFFECT)>0 then
if c:IsRelateToEffect(e) and c:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......
......@@ -2,7 +2,7 @@
function c90576781.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetCategory(CATEGORY_POSITION)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
......
......@@ -3,6 +3,7 @@ function c96782886.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(96782886,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCost(c96782886.cost)
......@@ -25,7 +26,7 @@ end
function c96782886.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
and Duel.IsExistingMatchingCard(c96782886.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c96782886.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
......
......@@ -82,7 +82,7 @@ end
function c97997309.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c97997309.filter2(chkc) end
if chk==0 then return Duel.IsExistingTarget(c97997309.filter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSITION)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local g=Duel.SelectTarget(tp,c97997309.filter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0)
end
......@@ -101,7 +101,7 @@ function c97997309.filter3(c)
return c:IsAbleToRemove()
end
function c97997309.target3(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkcLIsControler(1-tp) and c97997309.filter3(chkc) end
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and c97997309.filter3(chkc) end
if chk==0 then return Duel.IsExistingTarget(c97997309.filter3,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,c97997309.filter3,tp,0,LOCATION_ONFIELD,1,1,nil)
......
......@@ -2,7 +2,6 @@
function c98792570.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetLabel(0)
......
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