Commit 95b91147 authored by wind2009's avatar wind2009

script fix

parent 110b2049
Pipeline #27965 passed with stages
in 1 minute and 1 second
......@@ -2,6 +2,7 @@
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,33900648)
-- search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
......@@ -12,6 +13,7 @@ function s.initial_effect(c)
e1:SetTarget(s.thtg)
e1:SetOperation(s.thop)
c:RegisterEffect(e1)
-- unaffected
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
......@@ -19,6 +21,7 @@ function s.initial_effect(c)
e2:SetTargetRange(1,0)
e2:SetCode(97811903)
c:RegisterEffect(e2)
-- destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetCategory(CATEGORY_DESTROY+CATEGORY_DECKDES)
......@@ -65,7 +68,7 @@ function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function s.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsType(TYPE_MONSTER) and Duel.Destroy(tc,REASON_EFFECT)~=0 and Duel.IsPlayerCanDiscardDeck(1-tp,1) then
if tc:IsRelateToEffect(e) and tc:IsType(TYPE_MONSTER) and Duel.Destroy(tc,REASON_EFFECT)~=0 and Duel.IsPlayerCanDiscardDeck(1-tp,3) then
Duel.DiscardDeck(1-tp,3,REASON_EFFECT)
end
end
\ No newline at end of file
......@@ -2,6 +2,7 @@
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,33900648)
-- direct attack
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
......@@ -12,6 +13,7 @@ function s.initial_effect(c)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
-- unaffected
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
......@@ -19,6 +21,7 @@ function s.initial_effect(c)
e3:SetTargetRange(1,0)
e3:SetCode(97811903)
c:RegisterEffect(e3)
-- inflict damage
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,1))
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
......
......@@ -2,6 +2,7 @@
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,33900648)
-- unaffected
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
......@@ -9,6 +10,7 @@ function s.initial_effect(c)
e1:SetTargetRange(1,0)
e1:SetCode(97811903)
c:RegisterEffect(e1)
-- summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,2))
e2:SetType(EFFECT_TYPE_FIELD)
......@@ -17,6 +19,7 @@ function s.initial_effect(c)
e2:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0)
e2:SetTarget(s.suntg)
c:RegisterEffect(e2)
-- spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
......
--クリアー・ヴィシャス・ナイト
local s,id,o=GetID()
function s.initial_effect(c)
local e1=Effect.CreateEffect(c)
aux.AddCodeList(c,33900648)
-- summon proc
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
......@@ -14,6 +15,7 @@ function s.initial_effect(c)
local e2=e1:Clone()
e2:SetCode(EFFECT_SET_PROC)
c:RegisterEffect(e2)
-- atk
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_UPDATE_ATTACK)
......@@ -21,6 +23,7 @@ function s.initial_effect(c)
e3:SetRange(LOCATION_MZONE)
e3:SetValue(s.adval)
c:RegisterEffect(e3)
-- unaffected
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
......@@ -28,6 +31,7 @@ function s.initial_effect(c)
e4:SetTargetRange(1,0)
e4:SetCode(97811903)
c:RegisterEffect(e4)
-- cannot activate
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD)
e5:SetCode(EFFECT_CANNOT_ACTIVATE)
......
......@@ -2,10 +2,12 @@
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,33900648)
-- activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
-- search
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
......@@ -16,14 +18,16 @@ function s.initial_effect(c)
e2:SetTarget(s.thtg)
e2:SetOperation(s.thop)
c:RegisterEffect(e2)
-- indestructable
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e3:SetRange(LOCATION_SZONE)
e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e3:SetTarget(s.tg)
e3:SetTarget(s.indestg)
e3:SetValue(1)
c:RegisterEffect(e3)
-- avoid battle damage
local e4=e3:Clone()
e4:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e4:SetCode(EFFECT_AVOID_BATTLE_DAMAGE)
......@@ -33,6 +37,7 @@ function s.initial_effect(c)
e5:SetCode(EFFECT_NO_BATTLE_DAMAGE)
e5:SetTargetRange(0,LOCATION_MZONE)
c:RegisterEffect(e5)
-- affected
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_FIELD)
e6:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
......@@ -60,7 +65,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmCards(1-tp,g)
end
end
function s.tg(e,c)
function s.indestg(e,c)
return aux.IsCodeListed(c,33900648)
end
function s.cfilter(c)
......
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