Skip to content

Commit 85cf305

Browse files
authored
Updated some card scripts to use the new "Cost.AND" function
1 parent d02ebe6 commit 85cf305

File tree

3 files changed

+5
-22
lines changed

3 files changed

+5
-22
lines changed

official/c11441009.lua

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ function s.initial_effect(c)
1414
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
1515
e1:SetRange(LOCATION_MZONE)
1616
e1:SetCountLimit(1,id)
17-
e1:SetCost(s.drcost)
17+
e1:SetCost(Cost.AND(Cost.PayLP(600),Cost.Detach(1)))
1818
e1:SetTarget(s.drtg)
1919
e1:SetOperation(s.drop)
2020
c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT)
@@ -44,13 +44,6 @@ function s.xyzop(e,tp,chk)
4444
Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,EFFECT_FLAG_OATH,1)
4545
return true
4646
end
47-
function s.drcost(e,tp,eg,ep,ev,re,r,rp,chk)
48-
local pay=aux.PayLPCost(600)
49-
local detach=aux.dxmcostgen(1,1)
50-
if chk==0 then return pay(e,tp,eg,ep,ev,re,r,rp,chk) and detach(e,tp,eg,ep,ev,re,r,rp,chk) end
51-
pay(e,tp,eg,ep,ev,re,r,rp,chk)
52-
detach(e,tp,eg,ep,ev,re,r,rp,chk)
53-
end
5447
function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
5548
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
5649
Duel.SetTargetPlayer(tp)

official/c78693036.lua

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ function s.initial_effect(c)
3232
e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E)
3333
e2:SetCountLimit(1,id)
3434
e2:SetCondition(function(e,tp) return Duel.IsTurnPlayer(1-tp) end)
35-
e2:SetCost(s.descost)
35+
e2:SetCost(Cost.AND(Cost.PayLP(1500),Cost.SelfTribute))
3636
e2:SetTarget(s.destg)
3737
e2:SetOperation(s.desop)
3838
c:RegisterEffect(e2)
@@ -43,12 +43,6 @@ function s.lpop(e,tp,eg,ep,ev,re,r,rp)
4343
Duel.Recover(tp,300,REASON_EFFECT)
4444
end
4545
end
46-
function s.descost(e,tp,eg,ep,ev,re,r,rp,chk)
47-
local c=e:GetHandler()
48-
if chk==0 then return Duel.CheckLPCost(tp,1500) and c:IsReleasable() end
49-
Duel.PayLPCost(tp,1500)
50-
Duel.Release(c,REASON_COST)
51-
end
5246
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk)
5347
local g1=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
5448
local g2=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSpellTrap),tp,0,LOCATION_ONFIELD,nil)
@@ -65,11 +59,13 @@ end
6559
function s.desop(e,tp,eg,ep,ev,re,r,rp)
6660
local op=e:GetLabel()
6761
if op==1 then
62+
--Destroy all face-up monsters your opponent controls
6863
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
6964
if #g>0 then
7065
Duel.Destroy(g,REASON_EFFECT)
7166
end
7267
elseif op==2 then
68+
--Destroy all face-up Spells/Traps your opponent controls
7369
local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSpellTrap),tp,0,LOCATION_ONFIELD,nil)
7470
if #g>0 then
7571
Duel.Destroy(g,REASON_EFFECT)

official/c97476032.lua

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ function s.initial_effect(c)
1010
e1:SetType(EFFECT_TYPE_IGNITION)
1111
e1:SetRange(LOCATION_HAND)
1212
e1:SetCountLimit(1,id)
13-
e1:SetCost(s.spcost)
13+
e1:SetCost(Cost.AND(s.wateronlycost,Cost.Discard(aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_WATER),true)))
1414
e1:SetTarget(s.sptg)
1515
e1:SetOperation(s.spop)
1616
c:RegisterEffect(e1)
@@ -54,12 +54,6 @@ function s.wateronlycost(e,tp,eg,ep,ev,re,r,rp,chk)
5454
e1:SetReset(RESET_PHASE|PHASE_END)
5555
Duel.RegisterEffect(e1,tp)
5656
end
57-
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
58-
local discard=aux.DiscardCost(function(c) return c:IsAttribute(ATTRIBUTE_WATER) end,true)
59-
if chk==0 then return discard(e,tp,eg,ep,ev,re,r,rp,chk) and s.wateronlycost(e,tp,eg,ep,ev,re,r,rp,chk) end
60-
discard(e,tp,eg,ep,ev,re,r,rp,chk)
61-
s.wateronlycost(e,tp,eg,ep,ev,re,r,rp,chk)
62-
end
6357
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
6458
local c=e:GetHandler()
6559
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0

0 commit comments

Comments
 (0)