Commit 17291cfa authored by Chen Bill's avatar Chen Bill

fix: target effect

parent bbb3c8a0
......@@ -71,6 +71,7 @@ end
function c24857466.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
---dynamic target
function c24857466.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then
if ev==TYPE_TRAP then
......
......@@ -24,6 +24,7 @@ function c38844957.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(1)
return true
end
---dynamic target
function c38844957.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then
local te=e:GetLabelObject()
......
......@@ -26,6 +26,7 @@ function c58242947.cost(e,tp,eg,ep,ev,re,r,rp,chk)
g:AddCard(c)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
---dynamic target
function c58242947.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local te=c58242947[Duel.GetCurrentChain()]
if chkc then
......
......@@ -81,6 +81,7 @@ function c64756282.cpcost(e,tp,eg,ep,ev,re,r,rp,chk)
g:AddCard(c)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
---dynamic target
function c64756282.cptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
local te=e:GetLabelObject()
......
......@@ -15,6 +15,7 @@ function c68779682.condition(e,tp,eg,ep,ev,re,r,rp)
return rp==tp and not rc:IsStatus(STATUS_ACT_FROM_HAND) and rc:GetType()==TYPE_TRAP and re:IsHasType(EFFECT_TYPE_ACTIVATE)
and code1~=68779682 and code2~=68779682
end
---dynamic target
function c68779682.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then
local te=e:GetLabelObject()
......
......@@ -27,6 +27,7 @@ end
function c70226289.filter(c,e,tp)
return c:IsSetCard(0x128) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
---dynamic target
function c70226289.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc,exc)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c70226289.filter,tp,LOCATION_HAND,0,1,exc,e,tp) end
......
......@@ -22,6 +22,7 @@ end
function c75157704.filter(c)
return c:IsSetCard(0x14f) and not c:IsCode(75157704) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:CheckActivateEffect(false,true,false)~=nil
end
---dynamic target
function c75157704.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then
if e:GetLabel()==0 then return false end
......
......@@ -15,7 +15,7 @@ end
function c78394032.tkcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function c78394032.tktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
function c78394032.tktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,78394033,0,TYPES_TOKEN_MONSTER,200,200,1,RACE_MACHINE,ATTRIBUTE_EARTH,POS_FACEUP_ATTACK) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
......
......@@ -19,8 +19,8 @@ function c79016563.initial_effect(c)
e2:SetDescription(aux.Stringid(79016563,1))
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCondition(c79016563.atkcon)
......
......@@ -19,7 +19,7 @@ end
function c80186010.filter(c)
return c:IsCode(10080320) and c:IsAbleToHand()
end
function c80186010.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
function c80186010.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c80186010.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
......
......@@ -27,7 +27,7 @@ end
function c80908502.filter(c)
return c:IsCode(63035430) and c:IsAbleToHand()
end
function c80908502.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
function c80908502.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c80908502.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
......
......@@ -55,7 +55,7 @@ end
function c82735249.thfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x1066) and c:IsAbleToHand()
end
function c82735249.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
function c82735249.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c82735249.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
......
......@@ -12,7 +12,7 @@ end
function c83994646.filter(c)
return c:IsFaceup() and c:IsLevel(4)
end
function c83994646.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
function c83994646.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local g=Duel.GetMatchingGroup(c83994646.filter,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
......
......@@ -19,7 +19,7 @@ end
function c84430165.afilter(c,tp)
return c:IsControler(tp) and c:IsSetCard(0x12b) and c:IsType(TYPE_LINK)
end
function c84430165.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
function c84430165.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:IsExists(c84430165.afilter,1,nil,tp) end
end
function c84430165.cfilter(c)
......
......@@ -58,7 +58,7 @@ end
function c84941194.filter(c)
return c:IsCode(16528181) and c:IsAbleToHand()
end
function c84941194.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
function c84941194.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c84941194.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
......
......@@ -30,7 +30,7 @@ end
function c86377375.thfilter1(c)
return c:IsCode(59160188) and c:IsAbleToHand()
end
function c86377375.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
function c86377375.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c86377375.thfilter1,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
......
......@@ -16,7 +16,7 @@ function c87340664.condition(e,tp,eg,ep,ev,re,r,rp)
e:SetLabel(e:GetHandler():GetReasonPlayer())
return e:GetHandler():IsReason(REASON_BATTLE) and e:GetHandler():IsPreviousPosition(POS_FACEUP)
end
function c87340664.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
function c87340664.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(e:GetLabel())
Duel.SetTargetParam(1000)
......
......@@ -84,7 +84,7 @@ function c87897777.spfilter(c,e,tp)
local zone=1<<c:GetSequence()
return c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,zone)
end
function c87897777.mvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
function c87897777.mvtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c87897777.spfilter,tp,LOCATION_SZONE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_DICE,nil,0,tp,1)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_SZONE)
......
......@@ -40,7 +40,7 @@ end
function c88264978.filter(c,e,tp)
return c:IsRace(RACE_DRAGON) and not c:IsCode(88264978) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c88264978.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
function c88264978.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c88264978.filter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_HAND)
......
......@@ -42,7 +42,7 @@ c89907227.material_type=TYPE_SYNCHRO
function c89907227.tkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp and e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function c89907227.tktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
function c89907227.tktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,89907228,0,TYPES_TOKEN_MONSTER,3300,3000,10,RACE_FISH,ATTRIBUTE_WATER,POS_FACEUP_DEFENSE) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
......
......@@ -43,7 +43,7 @@ function c92519087.rtcon(e,tp,eg,ep,ev,re,r,rp)
local at=Duel.GetAttacker()
return at and at:IsControler(tp)
end
function c92519087.rttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
function c92519087.rttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c92519087.tgfilter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,PLAYER_ALL,LOCATION_REMOVED)
end
......
......@@ -63,7 +63,7 @@ end
function c93157004.eqfilter(c)
return c:IsSetCard(0x30) and c:IsType(TYPE_MONSTER) and not c:IsForbidden()
end
function c93157004.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
function c93157004.eqtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(c93157004.eqfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
......
......@@ -5,6 +5,7 @@ function c93581434.initial_effect(c)
e1:SetDescription(aux.Stringid(93581434,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,93581434)
e1:SetCondition(c93581434.spcon)
......
......@@ -5,6 +5,7 @@ function c93655221.initial_effect(c)
e1:SetCategory(CATEGORY_DISABLE+CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCondition(c93655221.condition)
e1:SetCost(c93655221.cost)
e1:SetTarget(c93655221.target)
......
......@@ -50,7 +50,7 @@ end
function c94395649.filter(c)
return c:IsLevelBelow(4) and c:IsRace(RACE_BEAST+RACE_BEASTWARRIOR+RACE_WINDBEAST) and c:IsAbleToRemoveAsCost()
end
function c94395649.cost(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
function c94395649.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c94395649.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c94395649.filter,tp,LOCATION_DECK,0,1,1,nil)
......
......@@ -23,6 +23,7 @@ function s.initial_effect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_BATTLE_DESTROYING)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,id+o)
e2:SetCondition(s.spcon)
e2:SetTarget(s.sptg)
......
......@@ -26,7 +26,7 @@ end
function c95453143.filter(c)
return c:IsLevelBelow(6) and c:IsType(TYPE_EFFECT) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToRemoveAsCost()
end
function c95453143.cost(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
function c95453143.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c95453143.filter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c95453143.filter,tp,LOCATION_GRAVE,0,1,1,nil)
......
......@@ -8,7 +8,7 @@ function c95463814.initial_effect(c)
e1:SetDescription(aux.Stringid(95463814,0))
e1:SetCategory(CATEGORY_DAMAGE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,95463814)
e1:SetTarget(c95463814.target)
......
......@@ -14,7 +14,7 @@ end
function c99788587.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsAllColumn()
end
function c99788587.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
function c99788587.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local g=e:GetHandler():GetColumnGroup()
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,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