Skip to content

Commit 08b7948

Browse files
committed
use aux.SelfRevealCost in cards that reveal themselves as a cost
1 parent 062fe05 commit 08b7948

File tree

7 files changed

+15
-56
lines changed

7 files changed

+15
-56
lines changed

official/c27268998.lua

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ function s.initial_effect(c)
1111
e1:SetType(EFFECT_TYPE_IGNITION)
1212
e1:SetRange(LOCATION_HAND)
1313
e1:SetCountLimit(1,id)
14-
e1:SetCost(s.setcost)
14+
e1:SetCost(aux.SelfRevealCost)
1515
e1:SetTarget(s.settg)
1616
e1:SetOperation(s.setop)
1717
c:RegisterEffect(e1)
@@ -32,12 +32,6 @@ end
3232
s.max_metalmorph_stats={5,RACE_FIEND}
3333
s.listed_names={CARD_MAX_METALMORPH}
3434
s.listed_series={SET_METALMORPH}
35-
function s.setcost(e,tp,eg,ep,ev,re,r,rp,chk)
36-
local c=e:GetHandler()
37-
if chk==0 then return not c:IsPublic() end
38-
Duel.ConfirmCards(1-tp,c)
39-
Duel.ShuffleHand(tp)
40-
end
4135
function s.setfilter(c)
4236
return c:IsSetCard(SET_METALMORPH) and c:IsTrap() and c:IsSSetable()
4337
end

official/c27704731.lua

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ function s.initial_effect(c)
1111
e1:SetType(EFFECT_TYPE_IGNITION)
1212
e1:SetRange(LOCATION_HAND)
1313
e1:SetCountLimit(1,id)
14-
e1:SetCost(s.thcost)
14+
e1:SetCost(aux.SelfRevealCost)
1515
e1:SetTarget(s.thtg)
1616
e1:SetOperation(s.thop)
1717
c:RegisterEffect(e1)
@@ -34,12 +34,6 @@ function s.initial_effect(c)
3434
end
3535
s.max_metalmorph_stats={5,RACE_WARRIOR}
3636
s.listed_names={CARD_MAX_METALMORPH,id}
37-
function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
38-
local c=e:GetHandler()
39-
if chk==0 then return not c:IsPublic() end
40-
Duel.ConfirmCards(1-tp,c)
41-
Duel.ShuffleHand(tp)
42-
end
4337
function s.thfilter(c)
4438
return c:ListsCode(CARD_MAX_METALMORPH) and not c:IsCode(id) and c:IsAbleToHand()
4539
end

official/c38648860.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(aux.SelfRevealCost)
1414
e1:SetTarget(s.sptg)
1515
e1:SetOperation(s.spop)
1616
c:RegisterEffect(e1)
@@ -39,12 +39,6 @@ function s.initial_effect(c)
3939
c:RegisterEffect(e3)
4040
end
4141
s.listed_series={SET_AZAMINA,SET_WHITE_FOREST,SET_SINFUL_SPOILS}
42-
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
43-
local c=e:GetHandler()
44-
if chk==0 then return not c:IsPublic() end
45-
Duel.ConfirmCards(1-tp,c)
46-
Duel.ShuffleHand(tp)
47-
end
4842
function s.spfilter(c,e,tp)
4943
return c:IsSetCard({SET_AZAMINA,SET_WHITE_FOREST}) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
5044
end

official/c67972302.lua

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ function s.initial_effect(c)
1717
e2:SetType(EFFECT_TYPE_IGNITION)
1818
e2:SetRange(LOCATION_HAND)
1919
e2:SetCountLimit(1,id)
20-
e2:SetCost(s.nscost)
20+
e2:SetCost(aux.SelfRevealCost)
2121
e2:SetTarget(s.nstg)
2222
e2:SetOperation(s.nsop)
2323
c:RegisterEffect(e2)
@@ -34,12 +34,6 @@ function s.initial_effect(c)
3434
c:RegisterEffect(e3)
3535
end
3636
s.listed_card_types={TYPE_SPIRIT}
37-
function s.nscost(e,tp,eg,ep,ev,re,r,rp,chk)
38-
local c=e:GetHandler()
39-
if chk==0 then return not c:IsPublic() end
40-
Duel.ConfirmCards(1-tp,c)
41-
Duel.ShuffleHand(tp)
42-
end
4337
function s.sumfilter(c)
4438
return c:IsType(TYPE_SPIRIT) and c:IsSummonable(true,nil)
4539
end

official/c80870883.lua

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ function s.initial_effect(c)
1111
e1:SetType(EFFECT_TYPE_IGNITION)
1212
e1:SetRange(LOCATION_HAND)
1313
e1:SetCountLimit(1,id)
14-
e1:SetCost(s.setcost)
14+
e1:SetCost(aux.SelfRevealCost)
1515
e1:SetTarget(s.settg)
1616
e1:SetOperation(s.setop)
1717
c:RegisterEffect(e1)
@@ -32,12 +32,6 @@ end
3232
s.max_metalmorph_stats={5,RACE_DRAGON}
3333
s.listed_names={CARD_MAX_METALMORPH}
3434
s.listed_series={SET_METALMORPH}
35-
function s.setcost(e,tp,eg,ep,ev,re,r,rp,chk)
36-
local c=e:GetHandler()
37-
if chk==0 then return not c:IsPublic() end
38-
Duel.ConfirmCards(1-tp,c)
39-
Duel.ShuffleHand(tp)
40-
end
4135
function s.setfilter(c)
4236
return c:IsSetCard(SET_METALMORPH) and c:IsTrap() and c:IsSSetable()
4337
end

official/c81260679.lua

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,31 @@
1-
-- オオヒメの御巫
2-
-- Ohime the Manifested Mikanko
3-
-- Scripted by Hatter
1+
--オオヒメの御巫
2+
--Ohime the Manifested Mikanko
3+
--Scripted by Hatter
44
local s,id=GetID()
55
function s.initial_effect(c)
66
c:EnableReviveLimit()
7-
-- Cannot be destroyed by battle
7+
--Cannot be destroyed by battle
88
local e1=Effect.CreateEffect(c)
99
e1:SetType(EFFECT_TYPE_SINGLE)
1010
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
1111
e1:SetValue(1)
1212
c:RegisterEffect(e1)
13-
-- Reflect battle damage
13+
--Reflect battle damage
1414
local e2=e1:Clone()
1515
e2:SetCode(EFFECT_REFLECT_BATTLE_DAMAGE)
1616
c:RegisterEffect(e2)
17-
-- Search 1 "Mikanko" card
17+
--Search 1 "Mikanko" card
1818
local e3=Effect.CreateEffect(c)
1919
e3:SetDescription(aux.Stringid(id,0))
2020
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_HANDES)
2121
e3:SetType(EFFECT_TYPE_IGNITION)
2222
e3:SetRange(LOCATION_HAND)
2323
e3:SetCountLimit(1,id)
24-
e3:SetCost(s.thcost)
24+
e3:SetCost(aux.SelfRevealCost)
2525
e3:SetTarget(s.thtg)
2626
e3:SetOperation(s.thop)
2727
c:RegisterEffect(e3)
28-
-- Equip 1 Equip Spell
28+
--Equip 1 Equip Spell
2929
local e4=Effect.CreateEffect(c)
3030
e4:SetDescription(aux.Stringid(id,1))
3131
e4:SetCategory(CATEGORY_EQUIP)
@@ -39,13 +39,8 @@ function s.initial_effect(c)
3939
e4:SetOperation(s.eqop)
4040
c:RegisterEffect(e4)
4141
end
42-
s.listed_names={16310544,id}
42+
s.listed_names={16310544,id} --"Mikanko Kagura"
4343
s.listed_series={SET_MIKANKO}
44-
function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
45-
local c=e:GetHandler()
46-
if chk==0 then return not c:IsPublic() end
47-
Duel.ConfirmCards(1-tp,c)
48-
end
4944
function s.thfilter(c)
5045
return c:IsSetCard(SET_MIKANKO) and c:IsAbleToHand() and not c:IsCode(id)
5146
end

official/c81418467.lua

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ function s.initial_effect(c)
2323
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_MAIN_END)
2424
e1:SetCountLimit(1,id)
2525
e1:SetCondition(function(e,tp) return Duel.IsTurnPlayer(1-tp) and Duel.IsMainPhase() end)
26-
e1:SetCost(s.sumcost)
26+
e1:SetCost(aux.SelfRevealCost)
2727
e1:SetTarget(s.sumtg)
2828
e1:SetOperation(s.sumop)
2929
c:RegisterEffect(e1)
@@ -67,12 +67,6 @@ function s.selfnssumop(e,tp,eg,ep,ev,re,r,rp,c)
6767
Duel.Release(g,REASON_SUMMON|REASON_COST|REASON_MATERIAL)
6868
g:DeleteGroup()
6969
end
70-
function s.sumcost(e,tp,eg,ep,ev,re,r,rp,chk)
71-
local c=e:GetHandler()
72-
if chk==0 then return not c:IsPublic() end
73-
Duel.ConfirmCards(1-tp,c)
74-
Duel.ShuffleHand(tp)
75-
end
7670
function s.sumfilter(c)
7771
return c:IsSetCard(SET_PRIMITE) and c:IsSummonable(true,nil)
7872
end

0 commit comments

Comments
 (0)