Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
9f5c044
add Cost.Replaceable
that-hatter Apr 10, 2026
01f358b
update Witchcrafter functions
that-hatter Apr 10, 2026
6de4169
update "Witchcrafter" cards
that-hatter Apr 10, 2026
43f0a5c
fix indentation
that-hatter Apr 10, 2026
ca0024b
no need for do block
that-hatter Apr 10, 2026
d3dfe68
update SForce functions
that-hatter Apr 10, 2026
29fbaf7
update "S-Force" cards
that-hatter Apr 10, 2026
8e4fc41
add EFFECT_COST_REPLACE
that-hatter Apr 10, 2026
7189ce1
refactor Cost.Replaceable
that-hatter Apr 10, 2026
da44141
pass base effect to extracon
that-hatter Apr 11, 2026
f17ca34
move extracon checking back to the value function
that-hatter Apr 11, 2026
c030277
update "S-Force Chase"
that-hatter Apr 12, 2026
0708c87
update Ursarctic functions
that-hatter Apr 12, 2026
1a08c29
update "Ursarctic" cards
that-hatter Apr 12, 2026
c6c333c
update Drytron functions
that-hatter Apr 12, 2026
bc76813
remove aux.StardustCost
that-hatter Apr 12, 2026
fd1678e
update "Stardust" cards
that-hatter Apr 12, 2026
d871348
Update cards_specific_functions.lua
pyrQ Apr 12, 2026
a10b0ce
Update utility.lua
pyrQ Apr 12, 2026
96f3629
update Vernusylph functions
that-hatter Apr 12, 2026
c654064
update "Vernusylph" cards
that-hatter Apr 12, 2026
441c273
Merge branch 'cost-replace-update' of https://github.com/ProjectIgnis…
that-hatter Apr 12, 2026
8bfc7be
update "Power Patron" cards
that-hatter Apr 12, 2026
d94bb48
update "Prank-Kids" cards
that-hatter Apr 12, 2026
16d28b9
update "Naturia" cards
that-hatter Apr 13, 2026
5bc4673
update cards "Fur Hire"
that-hatter Apr 13, 2026
5471997
Vernusylph Corolla
pyrQ Apr 13, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
315 changes: 155 additions & 160 deletions cards_specific_functions.lua

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions constant.lua
Original file line number Diff line number Diff line change
Expand Up @@ -630,6 +630,7 @@ EFFECT_ORICHALCUM_CHAIN = 511002116
EFFECT_DOUBLE_XYZ_MATERIAL = 511001225
EFFECT_SATELLARKNIGHT_CAPELLA = 86466163
EFFECT_STAR_SERAPH_SOVEREIGNTY = 91110378
EFFECT_COST_REPLACE = 84012625
--Events
EVENT_STARTUP = 1000
EVENT_FLIP = 1001
Expand Down
4 changes: 2 additions & 2 deletions official/c10266279.lua
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function s.initial_effect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,{id,1})
e2:SetCost(aux.CostWithReplace(s.mdescost,EFFECT_POWER_PATRON_REPLACE))
e2:SetCost(Cost.Replaceable(s.mdescost))
e2:SetTarget(s.mdestg)
e2:SetOperation(s.mdesop)
c:RegisterEffect(e2)
Expand Down Expand Up @@ -131,4 +131,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.HintSelection(g)
Duel.SendtoHand(g,nil,REASON_EFFECT)
end
end
end
14 changes: 8 additions & 6 deletions official/c14108995.lua
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function s.initial_effect(c)
e3:SetDescription(aux.Stringid(id,0))
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCode(CARD_VERNUSYLPH_COROLLA)
e3:SetCode(EFFECT_COST_REPLACE)
e3:SetRange(LOCATION_SZONE)
e3:SetTargetRange(LOCATION_HAND,0)
e3:SetCountLimit(1)
Expand All @@ -31,16 +31,18 @@ function s.initial_effect(c)
c:RegisterEffect(e3)
end
s.listed_series={SET_VERNUSYLPH}
function s.repval(base,e,tp,eg,ep,ev,re,r,rp,chk,extracon)
function s.repval(base,extracon,e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
return c:IsMonster() and c:IsSetCard(SET_VERNUSYLPH) and c:IsDiscardable()
end
function s.hintselectionfilter(c)
return c:IsCode(id) and not c:HasFlagEffect(id)
end
function s.repop(base,e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,id)
local c=base:GetHandler()
if #{Duel.GetPlayerEffect(tp,CARD_VERNUSYLPH_COROLLA)}>1 then
Duel.HintSelection(c,true)
if Duel.IsExistingMatchingCard(s.hintselectionfilter,tp,LOCATION_SZONE,0,1,c) then
Duel.HintSelection(c)
end
c:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,nil,aux.Stringid(id,1))
Duel.SendtoGrave(e:GetHandler(),REASON_COST|REASON_DISCARD)
end
end
4 changes: 2 additions & 2 deletions official/c1527418.lua
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function s.initial_effect(c)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,{id,1})
e2:SetCondition(s.negcon)
e2:SetCost(aux.CostWithReplace(s.negcost,EFFECT_FUR_HIRE_REPLACE))
e2:SetCost(Cost.Replaceable(s.negcost))
e2:SetTarget(s.negtg)
e2:SetOperation(s.negop)
c:RegisterEffect(e2)
Expand Down Expand Up @@ -62,4 +62,4 @@ function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function s.negop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateActivation(ev)
end
end
9 changes: 4 additions & 5 deletions official/c16471775.lua
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function s.initial_effect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(CARD_URSARCTIC_BIG_DIPPER)
e2:SetCode(EFFECT_COST_REPLACE)
e2:SetRange(LOCATION_GRAVE)
e2:SetTargetRange(1,0)
e2:SetCountLimit(1,{id,1})
Expand All @@ -44,11 +44,10 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmCards(1-tp,g)
end
end
function s.repval(base,e,tp,eg,ep,ev,re,r,rp,chk,extracon)
function s.repval(base,extracon,e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
return c:IsSetCard(SET_URSARCTIC) and c:IsMonster() and (extracon==nil or extracon(base,e,tp,eg,ep,ev,re,r,rp))
return c:IsSetCard(SET_URSARCTIC) and c:IsMonster() and extracon(base,e,tp,eg,ep,ev,re,r,rp)
end
function s.repop(base,e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,id)
Duel.Remove(base:GetHandler(),POS_FACEUP,REASON_COST|REASON_REPLACE)
end
end
4 changes: 2 additions & 2 deletions official/c16940215.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function s.initial_effect(c)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(s.discon)
e1:SetCost(aux.CostWithReplace(s.discost,CARD_NATURIA_CAMELLIA))
e1:SetCost(Cost.Replaceable(s.discost))
e1:SetTarget(s.distg)
e1:SetOperation(s.disop)
c:RegisterEffect(e1)
Expand Down Expand Up @@ -43,4 +43,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
end
end
4 changes: 2 additions & 2 deletions official/c17473466.lua
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function s.initial_effect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,{id,0})
e2:SetCost(aux.CostWithReplace(s.descost,EFFECT_POWER_PATRON_REPLACE))
e2:SetCost(Cost.Replaceable(s.descost))
e2:SetTarget(s.destg)
e2:SetOperation(s.desop)
c:RegisterEffect(e2)
Expand Down Expand Up @@ -107,4 +107,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
if #g>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
end
4 changes: 2 additions & 2 deletions official/c19605133.lua
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function s.initial_effect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCost(aux.CostWithReplace(s.atcost,CARD_NATURIA_CAMELLIA))
e2:SetCost(Cost.Replaceable(s.atcost))
e2:SetTarget(s.attg)
e2:SetOperation(s.atop)
c:RegisterEffect(e2)
Expand Down Expand Up @@ -65,4 +65,4 @@ function s.atop(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESETS_STANDARD_PHASE_END)
tc:RegisterEffect(e1)
end
end
end
8 changes: 6 additions & 2 deletions official/c19673561.lua
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,12 @@ function s.initial_effect(c)
e2:SetOperation(s.drop)
c:RegisterEffect(e2)
--replace discard effect
local e2=aux.CreateWitchcrafterReplace(c,id)
local e2=Witchcrafter.CreateCostReplaceEffect(c)
e2:SetDescription(aux.Stringid(id,2))
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,id)
e2:SetCondition(function(base) return base:GetHandler():IsAbleToGraveAsCost() end)
e2:SetOperation(function(base) Duel.SendtoGrave(base:GetHandler(),REASON_COST) end)
c:RegisterEffect(e2)
--to S/T Zone
local e4=Effect.CreateEffect(c)
Expand Down Expand Up @@ -77,4 +81,4 @@ function s.tfop(e,tp,eg,ep,ev,re,r,rp)
if c:IsRelateToEffect(e) then
Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
end
end
end
4 changes: 2 additions & 2 deletions official/c20515672.lua
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ function s.initial_effect(c)
e1b:SetRange(LOCATION_MZONE)
e1b:SetLabelObject(e1a)
e1b:SetTargetRange(0,LOCATION_MZONE)
e1b:SetTarget(aux.SForceTarget)
e1b:SetTarget(SForce.ColumnTarget)
c:RegisterEffect(e1b)
--Shuffle 1 "S-Force" monster into the Deck and Special Summon banished "S-Force" monster
local e2=Effect.CreateEffect(c)
Expand Down Expand Up @@ -69,4 +69,4 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
end
end
end
4 changes: 2 additions & 2 deletions official/c21368442.lua
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ function s.initial_effect(c)
e3:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e3:SetTargetRange(0,LOCATION_MZONE)
e3:SetValue(LOCATION_REMOVED)
e3:SetTarget(aux.SForceTarget)
e3:SetTarget(SForce.ColumnTarget)
c:RegisterEffect(e3)
end
s.listed_series={SET_S_FORCE}
Expand All @@ -43,4 +43,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
end
4 changes: 2 additions & 2 deletions official/c21522601.lua
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function s.initial_effect(c)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,{id,1})
e2:SetCost(aux.WitchcrafterDiscardCost)
e2:SetCost(Witchcrafter.DiscardCost)
e2:SetTarget(s.distg)
e2:SetOperation(s.disop)
c:RegisterEffect(e2)
Expand Down Expand Up @@ -72,4 +72,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp)
for tc in g:Iter() do
tc:NegateEffects(c,RESET_PHASE|PHASE_END)
end
end
end
4 changes: 2 additions & 2 deletions official/c21744288.lua
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ function s.initial_effect(c)
e1:SetCountLimit(1,id)
e1:SetHintTiming(0,TIMING_MAIN_END)
e1:SetCondition(function() return Duel.IsMainPhase() end)
e1:SetCost(aux.WitchcrafterDiscardAndReleaseCost)
e1:SetCost(Witchcrafter.TributeAndDiscardCost)
e1:SetTarget(s.sptarget)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
Expand Down Expand Up @@ -60,4 +60,4 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp)
if #g>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
end
6 changes: 3 additions & 3 deletions official/c22180094.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ function s.initial_effect(c)
e1:SetRange(LOCATION_MZONE)
e1:SetHintTiming(0,TIMING_MAIN_END|TIMING_SUMMON|TIMING_SPSUMMON)
e1:SetCountLimit(1,id)
e1:SetCost(aux.SForceCost)
e1:SetCost(SForce.BanishCost)
e1:SetTarget(s.thtg)
e1:SetOperation(s.thop)
c:RegisterEffect(e1)
Expand All @@ -28,7 +28,7 @@ function s.initial_effect(c)
e2:SetRange(LOCATION_MZONE)
e2:SetLabelObject(e2a)
e2:SetTargetRange(0,LOCATION_MZONE)
e2:SetTarget(aux.SForceTarget)
e2:SetTarget(SForce.ColumnTarget)
c:RegisterEffect(e2)
end
s.listed_series={SET_S_FORCE}
Expand All @@ -54,4 +54,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
end
end
end
end
9 changes: 4 additions & 5 deletions official/c25725326.lua
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function s.initial_effect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(CARD_PRANKKIDS_MEOWMU)
e1:SetCode(EFFECT_COST_REPLACE)
e1:SetRange(LOCATION_MZONE|LOCATION_GRAVE)
e1:SetTargetRange(1,0)
e1:SetCountLimit(1,id)
Expand All @@ -44,12 +44,11 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_PHASE|PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function s.repval(base,e,tp,eg,ep,ev,re,r,rp,chk,extracon)
function s.repval(base,extracon,e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
return Duel.IsTurnPlayer(1-tp) and c:IsSetCard(SET_PRANK_KIDS) and c:IsLocation(LOCATION_MZONE) and c:IsControler(tp)
and (extracon==nil or extracon(base,e,tp,eg,ep,ev,re,r,rp))
and extracon(base,e,tp,eg,ep,ev,re,r,rp)
end
function s.repop(base,e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,id)
Duel.Remove(base:GetHandler(),POS_FACEUP,REASON_COST|REASON_REPLACE)
end
end
6 changes: 3 additions & 3 deletions official/c27383719.lua
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function s.initial_effect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,{id,1})
e2:SetCost(aux.SForceCost)
e2:SetCost(SForce.BanishCost)
e2:SetTarget(s.destg)
e2:SetOperation(s.desop)
c:RegisterEffect(e2)
Expand All @@ -46,7 +46,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
end
end
function s.desfilter(c,e)
return aux.SForceTarget(e,c)
return SForce.ColumnTarget(e,c)
end
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(s.desfilter,tp,0,LOCATION_MZONE,nil,e)
Expand All @@ -58,4 +58,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp)
if #g>0 then
Duel.Destroy(g,REASON_EFFECT)
end
end
end
4 changes: 2 additions & 2 deletions official/c27693363.lua
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ function s.initial_effect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,{id,1})
e2:SetCost(aux.CostWithReplace(s.thspcost,CARD_URSARCTIC_BIG_DIPPER,s.extracon))
e2:SetCost(Cost.Replaceable(s.thspcost,s.extracon))
e2:SetTarget(s.thsptg)
e2:SetOperation(s.thspop)
c:RegisterEffect(e2)
Expand Down Expand Up @@ -124,4 +124,4 @@ function s.thspop(e,tp,eg,ep,ev,re,r,rp)
end
function s.extracon(base,e,tp,eg,ep,ev,re,r,rp,c)
return Duel.IsExistingMatchingCard(s.thspfilter,tp,LOCATION_GRAVE,0,1,c,e,tp,Duel.GetLocationCount(tp,LOCATION_MZONE)>0)
end
end
4 changes: 2 additions & 2 deletions official/c28715905.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
local s,id=GetID()
function s.initial_effect(c)
--special summon
c:RegisterEffect(aux.CreateUrsarcticSpsummon(c,id))
Ursarctic.AddSpSummonQuickEffect(c,id)
--Pop
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
Expand Down Expand Up @@ -42,4 +42,4 @@ function s.popop(e,tp,eg,ep,ev,re,r,rp)
if tc and tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
end
4 changes: 2 additions & 2 deletions official/c29537493.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
local s,id=GetID()
function s.initial_effect(c)
--special summon
c:RegisterEffect(aux.CreateUrsarcticSpsummon(c,id))
Ursarctic.AddSpSummonQuickEffect(c,id)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
Expand Down Expand Up @@ -32,4 +32,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
end
9 changes: 4 additions & 5 deletions official/c29942771.lua
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function s.initial_effect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCode(CARD_NATURIA_CAMELLIA)
e3:SetCode(EFFECT_COST_REPLACE)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(1,0)
e3:SetCountLimit(1,{id,1})
Expand Down Expand Up @@ -62,12 +62,11 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
function s.repval(base,e,tp,eg,ep,ev,re,r,rp,chk,extracon)
function s.repval(base,extracon,e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
return c:IsSetCard(SET_NATURIA) and c:IsMonster() and (extracon==nil or extracon(base,e,tp,eg,ep,ev,re,r,rp))
return c:IsSetCard(SET_NATURIA) and c:IsMonster() and extracon(base,e,tp,eg,ep,ev,re,r,rp)
end
function s.repop(base,e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,id)
Duel.DiscardDeck(tp,2,REASON_COST)
end
function s.spfilter(c,e,tp)
Expand All @@ -84,4 +83,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
if #g>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
end
Loading