Commit 76f31cc4 authored by argon.sun's avatar argon.sun

new

parent 0841e54c
--アマリリース
function c18988391.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(18988391,0))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_GRAVE)
e1:SetCost(c18988391.cost)
e1:SetOperation(c18988391.operation)
c:RegisterEffect(e1)
end
function c18988391.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,18988391)==0 and e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
Duel.RegisterFlagEffect(tp,18988391,RESET_PHASE+PHASE_END,0,1)
end
function c18988391.operation(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(18988391,1))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetTargetRange(LOCATION_HAND,0)
e1:SetCode(EFFECT_SUMMON_PROC)
e1:SetCondition(c18988391.sumcon)
e1:SetTarget(c18988391.efftg)
e1:SetOperation(c18988391.sumop)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c18988391.efftg(e,c)
local mi,ma=c:GetTributeRequirement()
return mi>0
end
function c18988391.sumcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local mi,ma=c:GetTributeRequirement()
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return (mi==1 and ft>0 and Duel.IsPlayerCanSummon(tp,SUMMON_TYPE_NORMAL,c))
or (ma==2 and ft>-1 and Duel.IsPlayerCanSummon(tp,SUMMON_TYPE_ADVANCE,c) and Duel.GetTributeCount(c)>=1)
end
function c18988391.sumop(e,tp,eg,ep,ev,re,r,rp,c)
local mi,ma=c:GetTributeRequirement()
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft>0 and (ma==1 or (mi==1 and Duel.SelectYesNo(tp,aux.Stringid(18988391,2)))) then
else
local g=Duel.SelectTribute(tp,c,1,1)
c:SetMaterial(g)
Duel.Release(g,REASON_SUMMON+REASON_MATERIAL)
end
e:Reset()
end
--No.53 偽骸神 Heart-eartH
function c23998625.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,aux.XyzFilterFunction(c,5),3)
c:EnableReviveLimit()
--atkup
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(23998625,0))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_BE_BATTLE_TARGET)
e1:SetTarget(c23998625.atktg)
e1:SetOperation(c23998625.atkop)
c:RegisterEffect(e1)
--destroy replace
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetCode(EFFECT_DESTROY_REPLACE)
e2:SetRange(LOCATION_MZONE)
e2:SetTarget(c23998625.reptg)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(23998625,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_DESTROYED)
e3:SetCondition(c23998625.spcon)
e3:SetTarget(c23998625.sptg)
e3:SetOperation(c23998625.spop)
c:RegisterEffect(e3)
end
function c23998625.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetCard(Duel.GetAttacker())
end
function c23998625.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and c:IsFaceup()
and tc:IsRelateToEffect(e) and tc:IsAttackable() and not tc:IsStatus(STATUS_ATTACK_CANCELED) then
local atk=tc:GetBaseAttack()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(atk)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
end
function c23998625.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_EFFECT) end
if Duel.SelectYesNo(tp,aux.Stringid(23998625,2)) then
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_EFFECT)
return true
else return false end
end
function c23998625.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_EFFECT) and e:GetHandler():GetOverlayCount()==0
and e:GetHandler():IsLocation(LOCATION_GRAVE)
end
function c23998625.spfilter(c,e,tp)
return c:IsCode(97403510) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false)
end
function c23998625.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c23998625.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c23998625.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local tc=Duel.GetFirstMatchingCard(c23998625.spfilter,tp,LOCATION_EXTRA,0,nil,e,tp)
if tc then
local cg=Group.FromCards(c)
tc:SetMaterial(cg)
Duel.Overlay(tc,cg)
Duel.SpecialSummon(tc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)
tc:CompleteProcedure()
end
end
--出目出し
function c31863912.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_SPSUMMON)
e1:SetTarget(c31863912.target1)
e1:SetOperation(c31863912.operation)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(31863912,0))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetRange(LOCATION_SZONE)
e2:SetTarget(c31863912.target2)
e2:SetOperation(c31863912.operation)
e2:SetLabel(1)
c:RegisterEffect(e2)
end
function c31863912.cfilter(c,sp)
return c:IsFaceup() and c:GetSummonPlayer()==sp and c:GetLevel()>0 and c:IsAbleToHand()
end
function c31863912.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local res,teg,tep,tev,tre,tr,trp=Duel.CheckEvent(EVENT_SPSUMMON_SUCCESS,true)
if res and teg:IsExists(c31863912.cfilter,1,nil,1-tp) then
e:SetLabel(1)
Duel.SetTargetCard(teg)
Duel.SetOperationInfo(0,CATEGORY_DICE,nil,0,tp,1)
else
e:SetLabel(0)
end
end
function c31863912.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:IsExists(c31863912.cfilter,1,nil,1-tp) end
Duel.SetTargetCard(eg)
Duel.SetOperationInfo(0,CATEGORY_DICE,nil,0,tp,1)
end
function c31863912.filter(c,sp,e,lv)
return c:IsFaceup() and c:GetSummonPlayer()==sp and c:GetLevel()==lv and c:IsAbleToHand() and c:IsRelateToEffect(e)
end
function c31863912.operation(e,tp,eg,ep,ev,re,r,rp)
if e:GetLabel()==0 or not e:GetHandler():IsRelateToEffect(e) then return end
local dc=Duel.TossDice(tp,1)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(c31863912.filter,nil,1-tp,e,dc)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
end
end
--紅炎の騎士
function c36569343.initial_effect(c)
--send to grave
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(36569343,0))
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e1:SetProperty(EFFECT_FLAG_CHAIN_UNIQUE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetCondition(c36569343.tgcon1)
e1:SetCost(c36569343.tgcost)
e1:SetTarget(c36569343.tgtg)
e1:SetOperation(c36569343.tgop1)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(36569343,0))
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetProperty(EFFECT_FLAG_CHAIN_UNIQUE)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCondition(c36569343.tgcon2)
e2:SetCost(c36569343.tgcost)
e2:SetTarget(c36569343.tgtg)
e2:SetOperation(c36569343.tgop2)
c:RegisterEffect(e2)
end
function c36569343.cfilter(c,tp)
return c:IsControler(tp) and c:IsReason(REASON_DESTROY) and c:IsAttribute(ATTRIBUTE_FIRE)
end
function c36569343.tgcon1(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c36569343.cfilter,1,nil,tp)
end
function c36569343.tgcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,36569343)==0 end
Duel.RegisterFlagEffect(tp,36569343,RESET_PHASE+PHASE_END,0,1)
end
function c36569343.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c36569343.tgop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFacedown() or not c:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c36569343.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
function c36569343.tgcon2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_DESTROY)
end
function c36569343.tgfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsAbleToGrave()
end
function c36569343.tgop2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c36569343.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
--レッド·ダストン
function c61019812.initial_effect(c)
--cannot release
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_UNRELEASABLE_SUM)
e1:SetValue(1)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UNRELEASABLE_NONSUM)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
e3:SetValue(1)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
c:RegisterEffect(e4)
local e5=e3:Clone()
e5:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
c:RegisterEffect(e5)
--damage
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(61019812,0))
e6:SetCategory(CATEGORY_DAMAGE)
e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e6:SetCode(EVENT_DESTROYED)
e6:SetCondition(c61019812.dmcon)
e6:SetTarget(c61019812.dmtg)
e6:SetOperation(c61019812.dmop)
c:RegisterEffect(e6)
--
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_SINGLE)
e7:SetCode(EFFECT_CANNOT_SUMMON)
e7:SetCondition(c61019812.excon)
c:RegisterEffect(e7)
local e8=e7:Clone()
e8:SetCode(EFFECT_CANNOT_FLIP_SUMMON)
c:RegisterEffect(e8)
local e9=Effect.CreateEffect(c)
e9:SetType(EFFECT_TYPE_SINGLE)
e9:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e9:SetCode(EFFECT_SPSUMMON_CONDITION)
e9:SetValue(c61019812.splimit)
c:RegisterEffect(e9)
local e10=Effect.CreateEffect(c)
e10:SetType(EFFECT_TYPE_SINGLE)
e10:SetCode(EFFECT_SELF_DESTROY)
e10:SetCondition(c61019812.descon)
c:RegisterEffect(e10)
end
function c61019812.dmcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsReason(REASON_DESTROY) and c:IsPreviousLocation(LOCATION_ONFIELD)
end
function c61019812.dmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local c=e:GetHandler()
Duel.SetTargetPlayer(c:GetPreviousControler())
Duel.SetTargetParam(500)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,c:GetPreviousControler(),500)
end
function c61019812.dmop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Damage(p,d,REASON_EFFECT)
end
function c61019812.exfilter(c,fid)
return c:IsFaceup() and c:GetCode()==61019812 and (fid==nil or c:GetFieldID()<fid)
end
function c61019812.excon(e)
local c=e:GetHandler()
return Duel.IsExistingMatchingCard(c61019812.exfilter,c:GetControler(),LOCATION_ONFIELD,0,1,nil)
end
function c61019812.splimit(e,se,sp,st,spos,tgp)
if bit.band(spos,POS_FACEDOWN)~=0 then return true end
return not Duel.IsExistingMatchingCard(c61019812.exfilter,tgp,LOCATION_ONFIELD,0,1,nil)
end
function c61019812.descon(e)
local c=e:GetHandler()
return Duel.IsExistingMatchingCard(c61019812.exfilter,c:GetControler(),LOCATION_ONFIELD,0,1,nil,c:GetFieldID())
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