|
3 | 3 | Duel.LoadCardScript(84124261) |
4 | 4 | local s,id=GetID() |
5 | 5 | function s.initial_effect(c) |
6 | | - --xyz summon |
7 | | - Xyz.AddProcedure(c,nil,1,2) |
8 | 6 | c:EnableReviveLimit() |
9 | | - --disable attack |
| 7 | + --Xyz Summon procedure: 2 Level 1 monsters |
| 8 | + Xyz.AddProcedure(c,nil,1,2) |
| 9 | + --Cannot be destroyed by battle, except with "Number" monsters |
10 | 10 | local e1=Effect.CreateEffect(c) |
11 | | - e1:SetDescription(aux.Stringid(id,0)) |
12 | | - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) |
13 | | - e1:SetRange(LOCATION_MZONE) |
14 | | - e1:SetCode(EVENT_ATTACK_ANNOUNCE) |
15 | | - e1:SetCondition(s.atkcon) |
16 | | - e1:SetCost(Cost.DetachFromSelf(1,1,function(e,og) Duel.Overlay(e:GetHandler():GetBattleTarget(),og) end)) |
17 | | - e1:SetTarget(s.atktg) |
18 | | - e1:SetOperation(s.atkop) |
| 11 | + e1:SetType(EFFECT_TYPE_SINGLE) |
| 12 | + e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) |
| 13 | + e1:SetValue(aux.NOT(aux.TargetBoolFunction(Card.IsSetCard,SET_NUMBER))) |
19 | 14 | c:RegisterEffect(e1) |
20 | | - --battle indestructable |
| 15 | + --Attach 1 Xyz Material from this card to 1 Xyz monster your opponent controls, then increase this card's ATK equal to the |
21 | 16 | local e2=Effect.CreateEffect(c) |
22 | | - e2:SetType(EFFECT_TYPE_SINGLE) |
23 | | - e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) |
24 | | - e2:SetValue(s.indes) |
| 17 | + e2:SetDescription(aux.Stringid(id,0)) |
| 18 | + e2:SetCategory(CATEGORY_ATKCHANGE) |
| 19 | + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) |
| 20 | + e2:SetCode(EVENT_ATTACK_ANNOUNCE) |
| 21 | + e2:SetRange(LOCATION_MZONE) |
| 22 | + e2:SetCondition(s.atkcon) |
| 23 | + e2:SetCost(Cost.DetachFromSelf(1,1,function(e,og) Duel.Overlay(e:GetHandler():GetBattleTarget(),og) end)) |
| 24 | + e2:SetTarget(s.atktg) |
| 25 | + e2:SetOperation(s.atkop) |
25 | 26 | c:RegisterEffect(e2) |
26 | 27 | end |
27 | | -s.listed_series={0x48} |
| 28 | +s.listed_series={SET_NUMBER} |
28 | 29 | s.xyz_number=39 |
29 | 30 | function s.atkcon(e,tp,eg,ep,ev,re,r,rp) |
30 | 31 | local c=e:GetHandler() |
31 | 32 | local bc=c:GetBattleTarget() |
32 | | - return bc and bc:IsType(TYPE_XYZ) and bc:IsFaceup() and bc:IsControler(1-tp) |
| 33 | + return bc and bc:IsXyzMonster() and bc:IsFaceup() and bc:IsControler(1-tp) |
33 | 34 | end |
34 | 35 | function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) |
35 | 36 | if chk==0 then return true end |
36 | 37 | Duel.SetTargetCard(e:GetHandler():GetBattleTarget()) |
37 | 38 | end |
38 | | -function s.ofilter(c) |
39 | | - return c:GetOverlayCount()~=0 |
| 39 | +function s.overlayfilter(c) |
| 40 | + return c:GetOverlayCount()>0 |
40 | 41 | end |
41 | 42 | function s.atkop(e,tp,eg,ep,ev,re,r,rp) |
42 | 43 | local c=e:GetHandler() |
43 | 44 | local tc=Duel.GetFirstTarget() |
44 | | - if Duel.NegateAttack() and c:IsRelateToEffect(e) and c:IsFaceup() then |
45 | | - local to=Duel.SelectMatchingCard(tp,s.ofilter,tp,0,LOCATION_MZONE,1,1,nil):GetFirst() |
46 | | - local toc=1 |
47 | | - local toc=to:GetOverlayCount() |
48 | | - local atk=math.abs(((tc:GetRank()-c:GetRank())*100)*toc) |
| 45 | + if c:IsRelateToEffect(e) and c:IsFaceup() then |
| 46 | + if Duel.GetAttacker()==c then Duel.NegateAttack() end |
| 47 | + local to=Duel.SelectMatchingCard(tp,s.overlayfilter,tp,0,LOCATION_MZONE,1,1,nil):GetFirst() |
| 48 | + local toc=1 |
| 49 | + local toc=to:GetOverlayCount() |
| 50 | + local atk=math.abs(((tc:GetRank()-c:GetRank())*100)*toc) |
49 | 51 | local e1=Effect.CreateEffect(c) |
50 | 52 | e1:SetType(EFFECT_TYPE_SINGLE) |
51 | 53 | e1:SetCode(EFFECT_SET_ATTACK_FINAL) |
52 | 54 | e1:SetValue(atk) |
53 | | - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) |
| 55 | + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) |
54 | 56 | c:RegisterEffect(e1) |
55 | 57 | end |
56 | 58 | end |
57 | | -function s.indes(e,c) |
58 | | - return not c:IsSetCard(SET_NUMBER) |
59 | | -end |
0 commit comments