|
3 | 3 | --Scripted by The Razgriz |
4 | 4 | local s,id=GetID() |
5 | 5 | function s.initial_effect(c) |
6 | | - --Must be properly SSd before reviving |
7 | 6 | c:EnableReviveLimit() |
8 | | - --Xyz Procedure |
| 7 | + --Xyz Procedure: 2+ Level 1 monsters |
9 | 8 | Xyz.AddProcedure(c,nil,1,2,nil,nil,99) |
10 | | - --ATK Up |
| 9 | + --This card gains 500 ATK for each material attached to it |
11 | 10 | local e1=Effect.CreateEffect(c) |
12 | 11 | e1:SetType(EFFECT_TYPE_SINGLE) |
13 | 12 | e1:SetCode(EFFECT_UPDATE_ATTACK) |
14 | 13 | e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) |
15 | 14 | e1:SetRange(LOCATION_MZONE) |
16 | | - e1:SetValue(s.atkval) |
| 15 | + e1:SetValue(function(e,c) return c:GetOverlayCount()*500 end) |
17 | 16 | c:RegisterEffect(e1) |
18 | | - --Return SSd monsters to hand |
| 17 | + --Return 1 of your opponent's Special Summoned monsters to your opponent's hand |
19 | 18 | local e2=Effect.CreateEffect(c) |
20 | 19 | e2:SetDescription(aux.Stringid(id,0)) |
21 | 20 | e2:SetCategory(CATEGORY_TOHAND) |
22 | 21 | e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) |
23 | 22 | e2:SetCode(EVENT_SPSUMMON_SUCCESS) |
24 | 23 | e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) |
25 | 24 | e2:SetRange(LOCATION_MZONE) |
26 | | - e2:SetCondition(s.condition) |
27 | | - e2:SetCost(s.cost) |
28 | | - e2:SetTarget(s.target) |
29 | | - e2:SetOperation(s.activate) |
| 25 | + e2:SetCondition(s.retopthcon) |
| 26 | + e2:SetCost(aux.dxmcostgen(1,1,nil)) |
| 27 | + e2:SetTarget(s.retopthtg) |
| 28 | + e2:SetOperation(s.retopthop) |
30 | 29 | c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) |
31 | | - --Add 1 LL monster from GY to hand |
| 30 | + --Add 1 "Lyrilusc" monster from your GY to your hand, except this card |
32 | 31 | local e3=Effect.CreateEffect(c) |
33 | 32 | e3:SetDescription(aux.Stringid(id,1)) |
34 | | - e3:SetCategory(CATEGORY_TOHAND) |
| 33 | + e3:SetCategory(CATEGORY_TOHAND+CATEGORY_LEAVE_GRAVE) |
35 | 34 | e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) |
36 | 35 | e3:SetCode(EVENT_TO_GRAVE) |
37 | 36 | e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP) |
38 | | - e3:SetCondition(s.tgcon) |
39 | | - e3:SetTarget(s.tgtg) |
40 | | - e3:SetOperation(s.tgop) |
| 37 | + e3:SetCondition(s.llthcon) |
| 38 | + e3:SetTarget(s.llthtg) |
| 39 | + e3:SetOperation(s.llthop) |
41 | 40 | c:RegisterEffect(e3) |
42 | 41 | end |
43 | | -s.listed_series={0xf7} |
44 | | -function s.atkval(e,c) |
45 | | - return c:GetOverlayCount()*500 |
| 42 | +s.listed_series={SET_LYRILUSC} |
| 43 | +function s.retopthfilter(c,e,tp) |
| 44 | + return c:IsSummonPlayer(1-tp) and c:IsAbleToHand() and c:IsCanBeEffectTarget(e) and c:IsLocation(LOCATION_MZONE) |
46 | 45 | end |
47 | | -function s.cfilter(c,e,tp) |
48 | | - return c:IsSummonPlayer(1-tp) and c:IsAbleToHand() and c:IsCanBeEffectTarget(e) |
49 | | - and c:IsLocation(LOCATION_MZONE) |
| 46 | +function s.retopthcon(e,tp,eg,ep,ev,re,r,rp) |
| 47 | + return eg:IsExists(s.retopthfilter,1,nil,e,tp) |
50 | 48 | end |
51 | | -function s.condition(e,tp,eg,ep,ev,re,r,rp) |
52 | | - return eg:IsExists(s.cfilter,1,nil,e,tp) |
53 | | -end |
54 | | -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) |
55 | | - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end |
56 | | - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) |
57 | | -end |
58 | | -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) |
59 | | - if chk==0 then return eg:IsExists(s.cfilter,1,nil,e,tp) end |
| 49 | +function s.retopthtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) |
| 50 | + if chkc then return eg:IsContains(chkc) and s.retopthfilter(chkc,e,tp) end |
| 51 | + if chk==0 then return eg:IsExists(s.retopthfilter,1,nil,e,tp) end |
60 | 52 | Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) |
61 | | - local g=eg:FilterSelect(tp,s.cfilter,1,1,nil,e,tp) |
62 | | - local tc=g:GetFirst() |
63 | | - Duel.SetTargetCard(tc) |
| 53 | + local tc=nil |
| 54 | + if #eg==1 then |
| 55 | + tc=eg:GetFirst() |
| 56 | + Duel.SetTargetCard(tc) |
| 57 | + else |
| 58 | + tc=eg:FilterSelect(tp,s.retopthfilter,1,1,nil,e,tp) |
| 59 | + Duel.SetTargetCard(tc) |
| 60 | + end |
64 | 61 | Duel.SetOperationInfo(0,CATEGORY_TOHAND,tc,1,0,0) |
65 | 62 | end |
66 | | -function s.activate(e,tp,eg,ep,ev,re,r,rp) |
| 63 | +function s.retopthop(e,tp,eg,ep,ev,re,r,rp) |
67 | 64 | local tc=Duel.GetFirstTarget() |
68 | 65 | if tc and tc:IsRelateToEffect(e) then |
69 | 66 | Duel.SendtoHand(tc,nil,REASON_EFFECT) |
70 | 67 | end |
71 | 68 | end |
72 | | -function s.tgcon(e,tp,eg,ep,ev,re,r,rp) |
| 69 | +function s.llthcon(e,tp,eg,ep,ev,re,r,rp) |
73 | 70 | local c=e:GetHandler() |
74 | 71 | return rp==1-tp and c:GetPreviousControler()==c:GetOwner() |
75 | 72 | end |
76 | | -function s.thfilter(c) |
77 | | - return c:IsSetCard(0xf7) and c:IsMonster() and c:IsAbleToHand() |
| 73 | +function s.llthfilter(c) |
| 74 | + return c:IsSetCard(SET_LYRILUSC) and c:IsMonster() and c:IsAbleToHand() |
78 | 75 | end |
79 | | -function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) |
| 76 | +function s.llthtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) |
80 | 77 | local c=e:GetHandler() |
81 | | - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.thfilter(chkc) and chkc~=c end |
82 | | - if chk==0 then return Duel.IsExistingTarget(s.thfilter,tp,LOCATION_GRAVE,0,1,c) end |
| 78 | + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.llthfilter(chkc) and chkc~=c end |
| 79 | + if chk==0 then return Duel.IsExistingTarget(s.llthfilter,tp,LOCATION_GRAVE,0,1,c) end |
83 | 80 | Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) |
84 | | - local tc=Duel.SelectTarget(tp,s.thfilter,tp,LOCATION_GRAVE,0,1,1,c) |
| 81 | + local tc=Duel.SelectTarget(tp,s.llthfilter,tp,LOCATION_GRAVE,0,1,1,c) |
85 | 82 | Duel.SetOperationInfo(0,CATEGORY_TOHAND,tc,1,0,0) |
86 | 83 | end |
87 | | -function s.tgop(e,tp,eg,ep,ev,re,r,rp) |
| 84 | +function s.llthop(e,tp,eg,ep,ev,re,r,rp) |
88 | 85 | local tc=Duel.GetFirstTarget() |
89 | 86 | if tc and tc:IsRelateToEffect(e) then |
90 | 87 | Duel.SendtoHand(tc,tp,REASON_EFFECT) |
|
0 commit comments