Commit 05c8b412 authored by VanillaSalt's avatar VanillaSalt

update

parent 9a2b83f3
--十二獣ラム
--The "get effect" effect is temporary
function c4145852.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
......@@ -13,14 +12,16 @@ function c4145852.initial_effect(c)
e1:SetOperation(c4145852.spop)
c:RegisterEffect(e1)
--get effect
if not c4145852.global_check then
c4145852.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_SPSUMMON_SUCCESS)
ge1:SetOperation(c4145852.checkop)
Duel.RegisterEffect(ge1,0)
end
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(4145852,1))
e2:SetCategory(CATEGORY_DISABLE)
e2:SetType(EFFECT_TYPE_XMATERIAL+EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetCondition(c4145852.discon)
e2:SetCost(c4145852.discost)
e2:SetTarget(c4145852.distg)
e2:SetOperation(c4145852.disop)
c:RegisterEffect(e2)
end
function c4145852.spcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(r,REASON_EFFECT+REASON_BATTLE)~=0
......@@ -30,7 +31,9 @@ function c4145852.spfilter(c,e,tp)
end
function c4145852.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c4145852.spfilter(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c4145852.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c4145852.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c4145852.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
......@@ -40,30 +43,9 @@ function c4145852.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
function c4145852.checkop(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
while tc do
if tc:IsType(TYPE_XYZ) and tc:GetOriginalRace()==RACE_BEASTWARRIOR
and tc:GetFlagEffect(4145852)==0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(4145852,1))
e1:SetCategory(CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(c4145852.discon)
e1:SetCost(c4145852.discost)
e1:SetTarget(c4145852.distg)
e1:SetOperation(c4145852.disop)
tc:RegisterEffect(e1,true)
tc:RegisterFlagEffect(4145852,0,0,1)
end
tc=eg:GetNext()
end
end
function c4145852.discon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:GetOverlayGroup():IsExists(Card.IsCode,1,nil,4145852)
return c:GetOriginalRace()==RACE_BEASTWARRIOR
and not c:IsStatus(STATUS_BATTLE_DESTROYED) and ep==1-tp
and re:IsActiveType(TYPE_TRAP) and Duel.IsChainDisablable(ev)
and re:IsHasProperty(EFFECT_FLAG_CARD_TARGET)
......
--十二獣ラビーナ
--The "get effect" effect is temporary
function c4367330.initial_effect(c)
--to hand
local e1=Effect.CreateEffect(c)
......@@ -13,14 +12,16 @@ function c4367330.initial_effect(c)
e1:SetOperation(c4367330.thop)
c:RegisterEffect(e1)
--get effect
if not c4367330.global_check then
c4367330.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_SPSUMMON_SUCCESS)
ge1:SetOperation(c4367330.checkop)
Duel.RegisterEffect(ge1,0)
end
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(4367330,1))
e2:SetCategory(CATEGORY_DISABLE)
e2:SetType(EFFECT_TYPE_XMATERIAL+EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetCondition(c4367330.discon)
e2:SetCost(c4367330.discost)
e2:SetTarget(c4367330.distg)
e2:SetOperation(c4367330.disop)
c:RegisterEffect(e2)
end
function c4367330.thcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(r,REASON_EFFECT+REASON_BATTLE)~=0
......@@ -31,6 +32,7 @@ end
function c4367330.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c4367330.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c4367330.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c4367330.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
......@@ -40,30 +42,9 @@ function c4367330.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
function c4367330.checkop(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
while tc do
if tc:IsType(TYPE_XYZ) and tc:GetOriginalRace()==RACE_BEASTWARRIOR
and tc:GetFlagEffect(4367330)==0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(4367330,1))
e1:SetCategory(CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(c4367330.discon)
e1:SetCost(c4367330.discost)
e1:SetTarget(c4367330.distg)
e1:SetOperation(c4367330.disop)
tc:RegisterEffect(e1,true)
tc:RegisterFlagEffect(4367330,0,0,1)
end
tc=eg:GetNext()
end
end
function c4367330.discon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:GetOverlayGroup():IsExists(Card.IsCode,1,nil,4367330)
return c:GetOriginalRace()==RACE_BEASTWARRIOR
and not c:IsStatus(STATUS_BATTLE_DESTROYED) and ep==1-tp
and re:IsActiveType(TYPE_SPELL) and Duel.IsChainDisablable(ev)
and re:IsHasProperty(EFFECT_FLAG_CARD_TARGET)
......
--十二獣サラブレード
--The "get effect" effect is temporary
function c77150143.initial_effect(c)
--draw
local e1=Effect.CreateEffect(c)
......@@ -15,14 +14,11 @@ function c77150143.initial_effect(c)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--get effect
if not c77150143.global_check then
c77150143.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_SPSUMMON_SUCCESS)
ge1:SetOperation(c77150143.checkop)
Duel.RegisterEffect(ge1,0)
end
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_XMATERIAL)
e3:SetCode(EFFECT_PIERCE)
e3:SetCondition(c77150143.condition)
c:RegisterEffect(e3)
end
function c77150143.filter(c)
return c:IsSetCard(0xf1) and c:IsDiscardable(REASON_EFFECT)
......@@ -37,22 +33,6 @@ function c77150143.drop(e,tp,eg,ep,ev,re,r,rp)
Duel.Draw(tp,1,REASON_EFFECT)
end
end
function c77150143.checkop(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
while tc do
if tc:IsType(TYPE_XYZ) and tc:GetOriginalRace()==RACE_BEASTWARRIOR
and tc:GetFlagEffect(77150143)==0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(77150143,1))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_PIERCE)
e1:SetCondition(c77150143.condition)
tc:RegisterEffect(e1,true)
tc:RegisterFlagEffect(77150143,0,0,1)
end
tc=eg:GetNext()
end
end
function c77150143.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,77150143)
function c77150143.condition(e)
return e:GetHandler():GetOriginalRace()==RACE_BEASTWARRIOR
end
--十二獣モルモラット
--The "get effect" effect is temporary
function c78872731.initial_effect(c)
--send to grave
local e1=Effect.CreateEffect(c)
......@@ -11,14 +10,16 @@ function c78872731.initial_effect(c)
e1:SetOperation(c78872731.operation)
c:RegisterEffect(e1)
--get effect
if not c78872731.global_check then
c78872731.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_SPSUMMON_SUCCESS)
ge1:SetOperation(c78872731.checkop)
Duel.RegisterEffect(ge1,0)
end
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(78872731,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_XMATERIAL+EFFECT_TYPE_IGNITION)
e2:SetCountLimit(1)
e2:SetCondition(c78872731.spcon)
e2:SetCost(c78872731.spcost)
e2:SetTarget(c78872731.sptg)
e2:SetOperation(c78872731.spop)
c:RegisterEffect(e2)
end
function c78872731.tgfilter(c)
return c:IsSetCard(0xf1) and c:IsAbleToGrave()
......@@ -34,29 +35,8 @@ function c78872731.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
function c78872731.checkop(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
while tc do
if tc:IsType(TYPE_XYZ) and tc:GetOriginalRace()==RACE_BEASTWARRIOR
and tc:GetFlagEffect(78872731)==0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(78872731,1))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCountLimit(1)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(c78872731.spcon)
e1:SetCost(c78872731.spcost)
e1:SetTarget(c78872731.sptg)
e1:SetOperation(c78872731.spop)
tc:RegisterEffect(e1,true)
tc:RegisterFlagEffect(78872731,0,0,1)
end
tc=eg:GetNext()
end
end
function c78872731.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,78872731)
return e:GetHandler():GetOriginalRace()==RACE_BEASTWARRIOR
end
function c78872731.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) 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