|
| 1 | +--ジョインテック・グレートウォール |
| 2 | +--Jointech Great Wall |
| 3 | +--scripted by YoshiDuels |
| 4 | +local s,id=GetID() |
| 5 | +function s.initial_effect(c) |
| 6 | + --Increase ATK |
| 7 | + local e1=Effect.CreateEffect(c) |
| 8 | + e1:SetCategory(CATEGORY_ATKCHANGE) |
| 9 | + e1:SetType(EFFECT_TYPE_ACTIVATE) |
| 10 | + e1:SetCode(EVENT_SUMMON_SUCCESS) |
| 11 | + e1:SetProperty(EFFECT_FLAG_DELAY) |
| 12 | + e1:SetCondition(s.condition) |
| 13 | + e1:SetTarget(s.target) |
| 14 | + e1:SetOperation(s.activate) |
| 15 | + c:RegisterEffect(e1) |
| 16 | +end |
| 17 | +function s.filter1(c,tp) |
| 18 | + return c:IsSummonPlayer(1-tp) and c:IsLocation(LOCATION_MZONE) and c:IsLevelAbove(7) |
| 19 | +end |
| 20 | +function s.cfilter(c) |
| 21 | + return c:IsFaceup() and c:IsRace(RACE_MACHINE) and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsLevelAbove(7) |
| 22 | +end |
| 23 | +function s.condition(e,tp,eg,ep,ev,re,r,rp) |
| 24 | + return eg:IsExists(s.filter1,1,nil,tp) and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) |
| 25 | +end |
| 26 | +function s.filter(c) |
| 27 | + return c:IsFaceup() and c:IsRace(RACE_MACHINE) and c:IsAttribute(ATTRIBUTE_EARTH) |
| 28 | +end |
| 29 | +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) |
| 30 | + if chk==0 then return Duel.IsExistingMatchingCard(aux.FilterMaximumSideFunctionEx(s.filter),tp,LOCATION_MZONE,0,1,nil) end |
| 31 | +end |
| 32 | +function s.activate(e,tp,eg,ep,ev,re,r,rp) |
| 33 | + local c=e:GetHandler() |
| 34 | + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) |
| 35 | + --Effect |
| 36 | + local g=Duel.SelectMatchingCard(tp,aux.FilterMaximumSideFunctionEx(s.filter),tp,LOCATION_MZONE,0,1,3,nil) |
| 37 | + if #g==0 then return end |
| 38 | + Duel.HintSelection(g,true) |
| 39 | + for tc in g:Iter() do |
| 40 | + local e1=Effect.CreateEffect(c) |
| 41 | + e1:SetType(EFFECT_TYPE_SINGLE) |
| 42 | + e1:SetCode(EFFECT_UPDATE_ATTACK) |
| 43 | + e1:SetValue(300) |
| 44 | + e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) |
| 45 | + tc:RegisterEffectRush(e1) |
| 46 | + --Cannot be destroyed by battle |
| 47 | + local e2=Effect.CreateEffect(e:GetHandler()) |
| 48 | + e2:SetDescription(3000) |
| 49 | + e2:SetProperty(EFFECT_FLAG_CLIENT_HINT) |
| 50 | + e2:SetType(EFFECT_TYPE_SINGLE) |
| 51 | + e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) |
| 52 | + e2:SetValue(1) |
| 53 | + e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) |
| 54 | + tc:RegisterEffectRush(e2) |
| 55 | + end |
| 56 | +end |
0 commit comments