Skip to content

Commit 575be25

Browse files
authored
Added new card script
1 parent 3535eb4 commit 575be25

File tree

1 file changed

+74
-0
lines changed

1 file changed

+74
-0
lines changed

pre-release/c100200281.lua

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
--三英の相剣師
2+
--The Three Brave Swordsouls
3+
--scripted by pyrQ
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
c:EnableReviveLimit()
7+
--Synchro Summon procedure: 1 Level 4 Tuner + 1+ non-Tuner monsters
8+
Synchro.AddProcedure(c,aux.FilterBoolFunction(Card.IsLevel,4),1,1,Synchro.NonTuner(nil),1,99)
9+
--Add 1 Level 4 or 8 Spellcaster monster whose ATK equals its own DEF from your Deck or GY to your hand
10+
local e1=Effect.CreateEffect(c)
11+
e1:SetDescription(aux.Stringid(id,0))
12+
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
13+
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
14+
e1:SetProperty(EFFECT_FLAG_DELAY)
15+
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
16+
e1:SetCountLimit(1,{id,0})
17+
e1:SetCondition(function(e) return e:GetHandler():IsSynchroSummoned() end)
18+
e1:SetTarget(s.thtg)
19+
e1:SetOperation(s.thop)
20+
c:RegisterEffect(e1)
21+
--Negate the effects of 1 face-up card on the field, then if you have an "Ecclesia" monster or "Fallen of Albaz" in your GY, you can destroy that card
22+
local e2=Effect.CreateEffect(c)
23+
e2:SetDescription(aux.Stringid(id,1))
24+
e2:SetCategory(CATEGORY_DISABLE+CATEGORY_DESTROY)
25+
e2:SetType(EFFECT_TYPE_IGNITION)
26+
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
27+
e2:SetRange(LOCATION_MZONE)
28+
e2:SetCountLimit(1,{id,1})
29+
e2:SetTarget(s.distg)
30+
e2:SetOperation(s.disop)
31+
c:RegisterEffect(e2)
32+
end
33+
s.listed_series={SET_ECCLESIA}
34+
s.listed_names={CARD_ALBAZ}
35+
function s.thfilter(c)
36+
return c:IsLevel(4,8) and c:IsRace(RACE_SPELLCASTER) and c:IsDefense(c:GetAttack()) and c:IsAttackAbove(0) and c:IsDefenseAbove(0)
37+
and c:IsAbleToHand()
38+
end
39+
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
40+
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil) end
41+
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE)
42+
end
43+
function s.thop(e,tp,eg,ep,ev,re,r,rp)
44+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
45+
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil)
46+
if #g>0 then
47+
Duel.SendtoHand(g,nil,REASON_EFFECT)
48+
Duel.ConfirmCards(1-tp,g)
49+
end
50+
end
51+
function s.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
52+
if chkc then return chkc:IsOnField() and chkc:IsNegatable() end
53+
if chk==0 then return Duel.IsExistingTarget(Card.IsNegatable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
54+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_NEGATE)
55+
local g=Duel.SelectTarget(tp,Card.IsNegatable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
56+
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,tp,0)
57+
Duel.SetPossibleOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0)
58+
end
59+
function s.desconfilter(c)
60+
return (c:IsSetCard(SET_ECCLESIA) and c:IsMonster()) or c:IsCode(CARD_ALBAZ)
61+
end
62+
function s.disop(e,tp,eg,ep,ev,re,r,rp,chk)
63+
local tc=Duel.GetFirstTarget()
64+
if tc:IsRelateToEffect(e) then
65+
--Negate its effects
66+
tc:NegateEffects(e:GetHandler())
67+
if Duel.IsExistingMatchingCard(s.desconfilter,tp,LOCATION_GRAVE,0,1,nil)
68+
and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
69+
Duel.AdjustInstantly(tc)
70+
Duel.BreakEffect()
71+
Duel.Destroy(tc,REASON_EFFECT)
72+
end
73+
end
74+
end

0 commit comments

Comments
 (0)