|
| 1 | +--ザ☆チョップ |
| 2 | +--The Chop |
| 3 | +--scripted by YoshiDuels |
| 4 | +local s,id=GetID() |
| 5 | +function s.initial_effect(c) |
| 6 | + --Activate |
| 7 | + local e1=Effect.CreateEffect(c) |
| 8 | + e1:SetDescription(aux.Stringid(id,0)) |
| 9 | + e1:SetCategory(CATEGORY_ATKCHANGE) |
| 10 | + e1:SetType(EFFECT_TYPE_ACTIVATE) |
| 11 | + e1:SetCode(EVENT_SUMMON_SUCCESS) |
| 12 | + e1:SetCondition(s.condition) |
| 13 | + e1:SetOperation(s.operation) |
| 14 | + c:RegisterEffect(e1) |
| 15 | +end |
| 16 | +function s.cfilter(c) |
| 17 | + return c:IsMonster() and not c:IsRace(RACE_DRAGON|RACE_HIGHDRAGON) |
| 18 | +end |
| 19 | +function s.condition(e,tp,eg,ep,ev,re,r,rp) |
| 20 | + if #eg~=1 then return false end |
| 21 | + local tc=eg:GetFirst() |
| 22 | + return tc:IsFaceup() and tc:IsSummonPlayer(1-tp) and Duel.IsExistingMatchingCard(Card.IsMonster,tp,LOCATION_GRAVE,0,1,nil) |
| 23 | + and not Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_GRAVE,0,1,nil) |
| 24 | +end |
| 25 | +function s.operation(e,tp,eg,ep,ev,re,r,rp) |
| 26 | + local tc=eg:GetFirst() |
| 27 | + local c=e:GetHandler() |
| 28 | + local e1=Effect.CreateEffect(c) |
| 29 | + e1:SetType(EFFECT_TYPE_SINGLE) |
| 30 | + e1:SetCode(EFFECT_UPDATE_ATTACK) |
| 31 | + e1:SetValue(-500) |
| 32 | + e1:SetReset(RESETS_STANDARD_PHASE_END) |
| 33 | + tc:RegisterEffect(e1) |
| 34 | + --Cannot activate its effects |
| 35 | + local e2=Effect.CreateEffect(c) |
| 36 | + e2:SetDescription(3302) |
| 37 | + e2:SetProperty(EFFECT_FLAG_CLIENT_HINT) |
| 38 | + e2:SetType(EFFECT_TYPE_SINGLE) |
| 39 | + e2:SetCode(EFFECT_CANNOT_TRIGGER) |
| 40 | + e2:SetReset(RESETS_STANDARD_PHASE_END) |
| 41 | + tc:RegisterEffect(e2) |
| 42 | +end |
0 commit comments