Commit 5fa061e9 authored by 大崎甜花's avatar 大崎甜花 Committed by GitHub

c81018013.lua

parent 86c7a21d
--资深病号·最上静香 --资深病号·最上静香
require("expansions/script/c81000000") require("expansions/script/c81000000")
function c81018013.initial_effect(c) function c81018013.initial_effect(c)
Tenka.Shizuka(c) Tenka.Shizuka(c)
--summon --summon
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_SUMMON_PROC) e2:SetCode(EFFECT_SUMMON_PROC)
e2:SetRange(LOCATION_HAND) e2:SetRange(LOCATION_HAND)
e2:SetCondition(c81018013.ntcon) e2:SetCondition(c81018013.ntcon)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--atkup --atkup
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_ATKCHANGE) e3:SetCategory(CATEGORY_ATKCHANGE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_BATTLE_DESTROYING) e3:SetCode(EVENT_BATTLE_DESTROYING)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCondition(aux.bdocon) e3:SetCondition(aux.bdocon)
e3:SetCondition(c81018013.atkcon) e3:SetTarget(c81018013.atktg)
e3:SetOperation(c81018013.atkop) e3:SetOperation(c81018013.atkop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c81018013.ntcon(e,c,minc) function c81018013.ntcon(e,c,minc)
if c==nil then return true end if c==nil then return true end
return minc==0 and c:IsLevelAbove(5) return minc==0 and c:IsLevelAbove(5)
and Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0)==0 and Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0)==0
and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
end end
function c81018013.atkcon(e,tp,eg,ep,ev,re,r,rp) function c81018013.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
return ep~=tp if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsFaceup() end
end if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
function c81018013.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
if chkc then return chkc:IsFaceup() and chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) end Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil)
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,1-tp,LOCATION_MZONE,0,1,nil) end end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) function c81018013.atkop(e,tp,eg,ep,ev,re,r,rp)
Duel.SelectTarget(tp,Card.IsFaceup,1-tp,LOCATION_MZONE,0,1,1,nil) local c=e:GetHandler()
end local tc=Duel.GetFirstTarget()
function c81018013.atkop(e,tp,eg,ep,ev,re,r,rp) if tc:IsFaceup() and tc:IsRelateToEffect(e) then
local tc=Duel.GetFirstTarget() local e1=Effect.CreateEffect(c)
if tc:IsFaceup() and tc:IsRelateToEffect(e) then e1:SetType(EFFECT_TYPE_SINGLE)
local e1=Effect.CreateEffect(e:GetHandler()) e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetValue(500)
e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetValue(500) tc:RegisterEffect(e1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) end
tc:RegisterEffect(e1) end
end
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment