Commit 10206e7d authored by Nemo Ma's avatar Nemo Ma

del

parent 4acf74ba
No preview for this file type
--核成兽的硬核
function c92266280.initial_effect(c)
c:SetUniqueOnField(1,0,36623431)
--activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_END_PHASE)
c:RegisterEffect(e1)
--activate in grave
local e2=e1:Clone()
e2:SetRange(LOCATION_GRAVE)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_ACTIVATE_COST)
e3:SetRange(LOCATION_GRAVE)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetTargetRange(1,0)
e3:SetTarget(c92266280.actarget)
e3:SetOperation(c92266280.costop)
c:RegisterEffect(e3)
--to hand
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(92266280,1))
e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetHintTiming(0,TIMING_END_PHASE)
e4:SetRange(LOCATION_SZONE)
e4:SetCountLimit(1,92266280)
e4:SetCost(c92266280.thcost)
e4:SetTarget(c92266280.thtg)
e4:SetOperation(c92266280.thop)
c:RegisterEffect(e4)
--effect gain
--disable spsummon
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_DISABLE_SUMMON+CATEGORY_DESTROY)
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetRange(LOCATION_HAND)
e5:SetCode(EVENT_SUMMON)
e5:SetLabelObject(c)
e5:SetCondition(c92266280.condition1)
e5:SetCost(c92266280.cost)
e5:SetTarget(c92266280.target1)
e5:SetOperation(c92266280.operation1)
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e6:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e6:SetRange(LOCATION_SZONE)
e6:SetTargetRange(LOCATION_HAND,0)
e6:SetTarget(aux.TargetBoolFunction(Card.IsCode,14309486))
e6:SetLabelObject(e5)
c:RegisterEffect(e6)
--Negate Trap
local e7=Effect.CreateEffect(c)
e7:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e7:SetType(EFFECT_TYPE_QUICK_O)
e7:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e7:SetCode(EVENT_CHAINING)
e7:SetRange(LOCATION_HAND)
e7:SetLabelObject(c)
e7:SetCondition(c92266280.condition2)
e7:SetCost(c92266280.cost)
e7:SetTarget(c92266280.target2)
e7:SetOperation(c92266280.operation2)
local e8=e6:Clone()
e8:SetTarget(aux.TargetBoolFunction(Card.IsCode,49680980))
e8:SetLabelObject(e7)
c:RegisterEffect(e8)
--Negate Spell
local e9=Effect.CreateEffect(c)
e9:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e9:SetType(EFFECT_TYPE_QUICK_O)
e9:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e9:SetCode(EVENT_CHAINING)
e9:SetRange(LOCATION_HAND)
e9:SetLabelObject(c)
e9:SetCondition(c92266280.condition3)
e9:SetCost(c92266280.cost)
e9:SetTarget(c92266280.target3)
e9:SetOperation(c92266280.operation3)
local e10=e6:Clone()
e10:SetTarget(aux.TargetBoolFunction(Card.IsCode,66816282))
e10:SetLabelObject(e9)
c:RegisterEffect(e10)
--Negate Monster
local e11=Effect.CreateEffect(c)
e11:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e11:SetType(EFFECT_TYPE_QUICK_O)
e11:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e11:SetCode(EVENT_CHAINING)
e11:SetRange(LOCATION_HAND)
e11:SetLabelObject(c)
e11:SetCondition(c92266280.condition4)
e11:SetCost(c92266280.cost)
e11:SetTarget(c92266280.target4)
e11:SetOperation(c92266280.operation4)
local e12=e6:Clone()
e12:SetTarget(aux.TargetBoolFunction(Card.IsCode,45041488))
e12:SetLabelObject(e11)
c:RegisterEffect(e12)
end
function c92266280.thfilter(c,tc)
return c:IsSetCard(0x1d) and c:IsAbleToHand()
end
function c92266280.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c92266280.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c92266280.thop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c92266280.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c92266280.actarget(e,te,tp)
return te:GetHandler()==e:GetHandler()
end
function c92266280.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,1000) end
Duel.PayLPCost(tp,1000)
end
function c92266280.tdfilter(c,tc)
return c:IsSetCard(0x1d) and c:IsAbleToDeck() and c~=tc
end
function c92266280.costop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c92266280.tdfilter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil,e:GetHandler())
if g:GetCount()>0 then
if g:GetFirst():IsLocation(LOCATION_HAND) then
Duel.ConfirmCards(1-tp,g)
end
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
end
local c=e:GetHandler()
Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
end
function c92266280.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetLabelObject():IsAbleToGraveAsCost() end
Duel.SendtoGrave(e:GetLabelObject(),REASON_COST)
end
--コアキメイル・オーバードーズ
function c92266280.condition1(e,tp,eg,ep,ev,re,r,rp)
return tp~=ep and Duel.GetCurrentChain()==0
end
function c92266280.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE_SUMMON,eg,eg:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,eg:GetCount(),0,0)
end
function c92266280.operation1(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateSummon(eg)
Duel.Destroy(eg,REASON_EFFECT)
if not (Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false)) then return end
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)
end
--コアキメイル・サンドマン
function c92266280.condition2(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and ep~=tp
and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_TRAP) and Duel.IsChainNegatable(ev)
end
function c92266280.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
end
function c92266280.operation2(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
if not (Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false)) then return end
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)
end
end
--コアキメイル・ウォール
function c92266280.condition3(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and ep~=tp
and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) and Duel.IsChainNegatable(ev)
end
function c92266280.target3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
end
function c92266280.operation3(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
if not (Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false)) then return end
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)
end
end
function c92266280.condition4(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and re:IsActiveType(TYPE_MONSTER)
and Duel.IsChainNegatable(ev)
end
function c92266280.target4(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
end
function c92266280.operation4(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
if not (Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false)) then return end
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)
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