Commit 3600e189 authored by VanillaSalt's avatar VanillaSalt

fix

parent 12a9c3a8
......@@ -10,7 +10,7 @@ function c14089428.initial_effect(c)
c:RegisterEffect(e1)
end
function c14089428.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsRelateToBattle() end
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
end
......
......@@ -36,7 +36,7 @@ function c14745409.initial_effect(c)
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(14745409,0))
e5:SetCategory(CATEGORY_EQUIP)
e5:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CHAIN_UNIQUE)
e5:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CHAIN_UNIQUE)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetCode(EVENT_TO_GRAVE)
e5:SetCondition(c14745409.eqcon)
......
......@@ -20,7 +20,7 @@ function c17189532.filter(c)
end
function c17189532.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c17189532.filter,tp,LOCATION_DECK,0,2,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_DECK)
end
function c17189532.operation(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetMatchingGroup(c17189532.filter,tp,LOCATION_DECK,0,nil)
......
......@@ -5,9 +5,8 @@ function c17377751.initial_effect(c)
c:EnableReviveLimit()
--cannot special summon
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SINGLE_RANGE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_EXTRA)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e1)
......
......@@ -32,9 +32,8 @@ function c21420702.descost(e,tp,eg,ep,ev,re,r,rp,chk)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTargetRange(1,0)
e1:SetProperty(EFFECT_FLAG_OATH)
e1:SetReset(RESET_PHASE+RESET_END)
Duel.RegisterEffect(e1,tp)
end
......
......@@ -15,13 +15,15 @@ function c29228529.costfilter(c)
end
function c29228529.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c29228529.costfilter,tp,LOCATION_HAND,0,2,e:GetHandler()) end
Duel.DiscardHand(tp,c29228529.costfilter,2,2,REASON_COST)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c29228529.costfilter,tp,LOCATION_HAND,0,2,2,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function c29228529.filter(c)
return c:IsType(TYPE_SPELL) and c:IsAbleToHand()
end
function c29228529.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:GetLocation()==LOCATION_GRAVE and chkc:GetControler()==tp and c29228529.filter(chkc) end
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c29228529.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c29228529.filter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c29228529.filter,tp,LOCATION_GRAVE,0,1,1,nil)
......
......@@ -23,9 +23,9 @@ function c29343734.initial_effect(c)
e4:SetDescription(aux.Stringid(29343734,0))
e4:SetCategory(CATEGORY_TODECK)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
e4:SetCondition(c29343734.retcon)
e4:SetTarget(c29343734.rettg)
e4:SetOperation(c29343734.retop)
c:RegisterEffect(e4)
--atk
......@@ -45,8 +45,13 @@ end
function c29343734.retcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION
end
function c29343734.rettg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,LOCATION_REMOVED,LOCATION_REMOVED,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
end
function c29343734.retop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_REMOVED,LOCATION_REMOVED,nil)
local g=Duel.GetMatchingGroup(nil,tp,LOCATION_REMOVED,LOCATION_REMOVED,nil)
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
end
function c29343734.atkfilter(c,att)
......
......@@ -37,8 +37,8 @@ function c296499.atktarget(e,c)
end
function c296499.mtop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetTurnPlayer()~=tp then return end
if Duel.CheckReleaseGroup(tp,Card.IsReleasableByCost,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(296499,0)) then
local g=Duel.SelectReleaseGroup(tp,Card.IsReleasableByCost,1,1,nil)
if Duel.CheckReleaseGroup(tp,Card.IsReleasable,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(296499,0)) then
local g=Duel.SelectReleaseGroup(tp,Card.IsReleasable,1,1,nil)
Duel.Release(g,REASON_COST)
else
Duel.Destroy(e:GetHandler(),REASON_RULE)
......
......@@ -10,9 +10,8 @@ end
function c31849106.activate(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_RANGE)
e1:SetCode(EFFECT_TO_GRAVE_REDIRECT)
e1:SetProperty(EFFECT_FLAG_IGNORE_RANGE)
e1:SetTarget(c31849106.rmtarget)
e1:SetValue(LOCATION_REMOVED)
e1:SetReset(RESET_PHASE+PHASE_END)
......
......@@ -66,7 +66,7 @@ function c35220244.atkop(e,tp,eg,ep,ev,re,r,rp)
end
function c35220244.discon(e,tp,eg,ep,ev,re,r,rp)
local ec=e:GetHandler():GetEquipTarget()
return ec and (ec==Duel.GetAttacker() or ec==Duel.GetAttackTarget()) and ec:GetBattleTarget():IsFaceup()
return ec and (ec==Duel.GetAttacker() or ec==Duel.GetAttackTarget()) and ec:GetBattleTarget()
end
function c35220244.disop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetHandler():GetEquipTarget():GetBattleTarget()
......
......@@ -13,7 +13,7 @@ function c35514096.filter(c)
end
function c35514096.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and c35514096.filter(chkc) end
if chk==0 then return e:GetHandler():IsRelateToBattle() end
if chk==0 then return true end
local c=e:GetHandler()
local t1=c:IsChainAttackable()
local t2=Duel.IsExistingTarget(c35514096.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
......
......@@ -11,7 +11,7 @@ function c39284521.initial_effect(c)
e1:SetOperation(c39284521.spop)
c:RegisterEffect(e1)
end
function c39284521.spfilter(c,ec)
function c39284521.spfilter(c)
return c:IsRace(RACE_MACHINE) and c:IsAbleToGraveAsCost()
end
function c39284521.spcon(e,c)
......
......@@ -45,21 +45,14 @@ function c40101111.ffilter(c)
end
function c40101111.recon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local a=Duel.GetAttacker()
local d=Duel.GetAttackTarget()
return (c==a and d:IsLocation(LOCATION_GRAVE) and d:IsType(TYPE_MONSTER))
or (c==d and a:IsLocation(LOCATION_GRAVE) and a:IsType(TYPE_MONSTER))
local bc=c:GetBattleTarget()
return c:IsRelateToBattle() and bc:IsLocation(LOCATION_GRAVE) and bc:IsType(TYPE_MONSTER)
end
function c40101111.rectg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsRelateToBattle() end
local a=Duel.GetAttacker()
local d=Duel.GetAttackTarget()
Duel.SetTargetPlayer(tp)
local rec=0
if c==a then rec=d:GetAttack()
else rec=a:GetAttack() end
if chk==0 then return true end
local rec=e:GetHandler():GetBattleTarget():GetAttack()
if rec<0 then rec=0 end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(rec)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,rec)
end
......
......@@ -18,8 +18,7 @@ function c41639001.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
if not g or not g:IsContains(c) then return false end
return re:IsHasType(EFFECT_TYPE_ACTIVATE) or re:IsActiveType(TYPE_MONSTER)
return g and g:IsContains(c)
end
function c41639001.spfilter(c,e,tp)
return c:IsType(TYPE_NORMAL) and c:IsRace(RACE_DRAGON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
......@@ -48,7 +48,7 @@ function c4694209.addct2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and chkc:IsFaceup() end
if chk==0 then return e:GetHandler():IsCanRemoveCounter(tp,0x21,1,REASON_EFFECT)
and Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_ONFIELD,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(98162021,1))
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(4694209,1))
Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_ONFIELD,0,1,1,e:GetHandler())
end
function c4694209.addc2(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -17,10 +17,8 @@ function c47506081.initial_effect(c)
end
function c47506081.damcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local a=Duel.GetAttacker()
local d=Duel.GetAttackTarget()
return not c:IsStatus(STATUS_BATTLE_DESTROYED)
and ((c==a and d:GetLocation()==LOCATION_GRAVE) or (c==d and a:GetLocation()==LOCATION_GRAVE))
local bc=c:GetBattleTarget()
return c:IsRelateToBattle() and bc:IsLocation(LOCATION_GRAVE) and bc:IsType(TYPE_MONSTER)
end
function c47506081.damcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
......
......@@ -13,21 +13,15 @@ function c49771608.initial_effect(c)
end
function c49771608.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local a=Duel.GetAttacker()
local d=Duel.GetAttackTarget()
return not c:IsStatus(STATUS_BATTLE_DESTROYED)
and ((c==a and d:GetLocation()==LOCATION_GRAVE) or (c==d and a:GetLocation()==LOCATION_GRAVE))
local bc=c:GetBattleTarget()
return c:IsRelateToBattle() and bc:IsLocation(LOCATION_GRAVE) and bc:IsType(TYPE_MONSTER)
end
function c49771608.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local a=Duel.GetAttacker()
local d=Duel.GetAttackTarget()
local m=0
if a==e:GetHandler() then m=d:GetLevel()*300
else m=a:GetLevel()*300 end
local rec=e:GetHandler():GetBattleTarget():GetLevel()*300
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(m)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,m)
Duel.SetTargetParam(rec)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,rec)
end
function c49771608.operation(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
......
--`ɡ֥쥤`
function c51047350.initial_effect(c)
c:EnableReviveLimit()
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
......
......@@ -42,7 +42,6 @@ function c55171412.initial_effect(c)
e5:SetDescription(aux.Stringid(55171412,1))
e5:SetCategory(CATEGORY_DESTROY)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetProperty(EFFECT_FLAG_CARD_TARGET)
e5:SetRange(LOCATION_MZONE)
e5:SetCountLimit(1)
e5:SetCost(c55171412.descost)
......
......@@ -52,7 +52,7 @@ end
function c5861892.arcanareg(c,coin)
--coin effect
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(34568403,1))
e1:SetDescription(aux.Stringid(5861892,1))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
......@@ -64,7 +64,7 @@ function c5861892.arcanareg(c,coin)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(34568403,2))
e2:SetDescription(aux.Stringid(5861892,2))
e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_F)
e2:SetCode(EVENT_CHAINING)
......
......@@ -44,7 +44,7 @@ function c61777313.cfilter(c,lv)
return c:IsSetCard(0x42) and clv>0 and clv~=lv and c:IsAbleToGraveAsCost()
end
function c61777313.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c61777313.cfilter,tp,LOCATION_DECK,0,1,nil) end
if chk==0 then return Duel.IsExistingMatchingCard(c61777313.cfilter,tp,LOCATION_DECK,0,1,nil,e:GetHandler():GetLevel()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c61777313.cfilter,tp,LOCATION_DECK,0,1,1,nil,e:GetHandler():GetLevel())
Duel.SendtoGrave(g,REASON_COST)
......
......@@ -24,9 +24,10 @@ end
function c62878208.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(c62878208.filter1,tp,LOCATION_SZONE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(75886890,2))
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(62878208,2))
local g1=Duel.SelectTarget(tp,c62878208.filter1,tp,LOCATION_SZONE,0,1,1,nil,e,tp)
e:SetLabelObject(g1:GetFirst())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUPATTACK)
local g2=Duel.SelectTarget(tp,c62878208.filter2,tp,0,LOCATION_MZONE,1,1,nil,g1:GetFirst())
Duel.SetOperationInfo(0,CATEGORY_EQUIP,g1,1,0,0)
end
......
......@@ -18,9 +18,9 @@ end
function c68722455.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c68722455.costfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end
local rt=Duel.GetTargetCount(Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local cg=Duel.SelectMatchingCard(tp,c68722455.costfilter,tp,LOCATION_HAND,0,1,rt,nil)
Duel.SendtoGrave(cg,REASON_COST+REASON_DISCARD)
Duel.SendtoGrave(cg,REASON_COST)
e:SetLabel(cg:GetCount())
end
function c68722455.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
......
......@@ -22,9 +22,8 @@ function c69537999.descost(e,tp,eg,ep,ev,re,r,rp,chk)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTargetRange(1,0)
e1:SetProperty(EFFECT_FLAG_OATH)
e1:SetReset(RESET_PHASE+RESET_END)
Duel.RegisterEffect(e1,tp)
end
......
......@@ -21,7 +21,7 @@ end
function c71395725.chop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetCurrentChain()==1 then
e:SetLabel(0)
elseif re:IsHasType(EFFECT_TYPE_ACTIVATE) then
else
e:SetLabel(1)
end
end
......
......@@ -26,10 +26,12 @@ function c74923978.condition(e,tp,eg,ep,ev,re,r,rp)
end
function c74923978.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsRelateToEffect(e) end
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,1-tp,eg:GetCount())
local ct=eg:FilterCount(c74923978.cfilter,nil,tp)
e:SetLabel(ct)
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,1-tp,ct)
end
function c74923978.operation(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local ct=eg:GetCount()
local ct=e:GetLabel()
Duel.DiscardHand(1-tp,nil,ct,ct,REASON_EFFECT+REASON_DISCARD)
end
......@@ -54,13 +54,12 @@ function c75524092.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetEquipTarget():IsReason(REASON_BATTLE) end
return true
end
function c75524092.desfilter(c)
return c~=Duel.GetAttacker() and c~=Duel.GetAttackTarget() and c:IsDestructable()
end
function c75524092.desrepop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,c75524092.desfilter,tp,0,LOCATION_MZONE,1,1,nil)
local exc=Duel.GetAttacker()
if exc:IsControler(tp) then exc=Duel.GetAttackTarget() end
local g=Duel.SelectMatchingCard(tp,Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,exc)
if Duel.Destroy(g,REASON_EFFECT)>0 and Duel.Damage(1-tp,600,REASON_EFFECT)~=0 then
if Duel.GetLocationCount(1-tp,LOCATION_MZONE,tp)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,75524093,0,0x4011,2500,2500,7,RACE_FIEND,ATTRIBUTE_DARK,POS_FACEUP,1-tp) then
......
......@@ -14,13 +14,15 @@ function c77910045.initial_effect(c)
c:RegisterEffect(e2)
end
function c77910045.filter(c,tp)
return c:IsPreviousLocation(LOCATION_MZONE) and c:GetControler()==tp and c:IsType(TYPE_MONSTER)
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsControler(tp) and c:IsType(TYPE_MONSTER)
end
function c77910045.operation(e,tp,eg,ep,ev,re,r,rp)
if eg:IsExists(c77910045.filter,1,nil,tp) then
Duel.Damage(tp,500,REASON_EFFECT)
local ct=eg:FilterCount(c77910045.filter,nil,tp)
if ct>0 then
Duel.Damage(tp,500*ct,REASON_EFFECT)
end
if eg:IsExists(c77910045.filter,1,nil,1-tp) then
Duel.Damage(1-tp,500,REASON_EFFECT)
ct=eg:FilterCount(c77910045.filter,nil,1-tp)
if ct>0 then
Duel.Damage(1-tp,500*ct,REASON_EFFECT)
end
end
......@@ -44,9 +44,9 @@ function c79229522.sprcon(e,c)
and Duel.IsExistingMatchingCard(c79229522.spfilter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,tp)
end
function c79229522.sprop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(79205581,0))
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(79229522,0))
local g1=Duel.SelectMatchingCard(tp,c79229522.spfilter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil,tp)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(79205581,1))
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(79229522,1))
local g2=Duel.SelectMatchingCard(tp,c79229522.spfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,10,g1:GetFirst(),tp)
g1:Merge(g2)
Duel.SendtoGrave(g1,REASON_COST)
......
......@@ -16,13 +16,13 @@ function c84080938.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Release(e:GetHandler(),REASON_COST)
end
function c84080938.filter(c,tid)
return c:IsType(TYPE_MONSTER) and c:GetTurnID()==tid and c:IsReason(REASON_BATTLE) and c:IsAbleToDeck()
return c:IsType(TYPE_MONSTER) and c:GetTurnID()==tid and c:IsReason(REASON_BATTLE) and c:IsAbleToHand()
end
function c84080938.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local tid=Duel.GetTurnCount()
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c84080938.filter(chkc,tid) end
if chk==0 then return Duel.IsExistingTarget(c84080938.filter,tp,LOCATION_GRAVE,0,1,nil,tid) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,c84080938.filter,tp,LOCATION_GRAVE,0,1,1,nil,tid)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
......
......@@ -16,13 +16,13 @@ function c84080939.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Release(e:GetHandler(),REASON_COST)
end
function c84080939.filter(c,tid)
return c:IsType(TYPE_MONSTER) and c:GetTurnID()==tid and c:IsReason(REASON_BATTLE) and c:IsAbleToDeck()
return c:IsType(TYPE_MONSTER) and c:GetTurnID()==tid and c:IsReason(REASON_BATTLE) and c:IsAbleToHand()
end
function c84080939.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local tid=Duel.GetTurnCount()
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c84080939.filter(chkc,tid) end
if chk==0 then return Duel.IsExistingTarget(c84080939.filter,tp,LOCATION_GRAVE,0,1,nil,tid) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,c84080939.filter,tp,LOCATION_GRAVE,0,1,1,nil,tid)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
......
......@@ -51,9 +51,8 @@ function c8487449.regop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(8487449,0))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_REPEAT)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetProperty(EFFECT_FLAG_REPEAT)
e1:SetCountLimit(1)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(c8487449.thcon)
......
......@@ -16,10 +16,8 @@ function c86170989.filter2(c,e,tp)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c86170989.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c86170989.filter2(chkc,e,tp) end
return e:GetHandler():IsRelateToBattle()
end
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c86170989.filter2(chkc,e,tp) end
if chk==0 then return true end
local op=0
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(86170989,0))
local t1=Duel.IsExistingMatchingCard(c86170989.filter1,tp,LOCATION_DECK,0,1,nil)
......
......@@ -3,7 +3,6 @@ function c95308449.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c95308449.cost)
......
......@@ -16,7 +16,7 @@ function c99594764.thcon(e,tp,eg,ep,ev,re,r,rp)
return eg:GetCount()==1 and eg:GetFirst()==e:GetHandler():GetEquipTarget()
end
function c99594764.filter(c,race,att)
return c:IsRace(race) and c:IsAttribute(att) and c:GetLevel()<=4
return c:IsRace(race) and c:IsAttribute(att) and c:GetLevel()<=4 and c:IsAbleToHand()
end
function c99594764.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local eqc=e:GetHandler():GetEquipTarget()
......
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