Commit 7400bb8d authored by wind2009's avatar wind2009

Fix ヴォルカニック・デビル, E-HERO マリシャス・デビル

parent edf38cb7
Pipeline #29197 passed with stages
in 1 minute and 22 seconds
No preview for this file type
--ヴォルカニック・デビル
function c32543380.initial_effect(c)
c:EnableReviveLimit()
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c32543380.spcon)
e1:SetTarget(c32543380.sptg)
e1:SetOperation(c32543380.spop)
c:RegisterEffect(e1)
--must attack
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_MUST_ATTACK)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c32543380.bpcon)
e2:SetTargetRange(0,LOCATION_MZONE)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_MUST_ATTACK_MONSTER)
e3:SetValue(c32543380.atklimit)
c:RegisterEffect(e3)
--special summon
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(32543380,0))
e5:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e5:SetCode(EVENT_BATTLE_DESTROYING)
e5:SetCondition(c32543380.descon)
e5:SetTarget(c32543380.destg)
e5:SetOperation(c32543380.desop)
c:RegisterEffect(e5)
end
function c32543380.bpcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return Duel.GetTurnPlayer()~=e:GetHandler():GetControler()
and ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE
end
function c32543380.spfilter(c)
return c:IsFaceup() and c:IsCode(21420702) and c:IsAbleToGraveAsCost()
end
function c32543380.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c32543380.spfilter,tp,LOCATION_ONFIELD,0,1,nil)
end
function c32543380.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetMatchingGroup(c32543380.spfilter,tp,LOCATION_ONFIELD,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tc=g:SelectUnselect(nil,tp,false,true,1,1)
if tc then
e:SetLabelObject(tc)
return true
else return false end
end
function c32543380.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.SendtoGrave(g,REASON_SPSUMMON)
end
function c32543380.atklimit(e,c)
return c==e:GetHandler()
end
function c32543380.descon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local a=Duel.GetAttacker()
local d=Duel.GetAttackTarget()
if a~=c then d=a end
return c:IsRelateToBattle() and c:IsFaceup()
and d and d:IsLocation(LOCATION_GRAVE) and d:IsType(TYPE_MONSTER)
end
function c32543380.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,g:GetCount()*500)
end
function c32543380.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_MZONE,nil)
local ct=Duel.Destroy(g,REASON_EFFECT)
if ct>0 then
Duel.Damage(1-tp,ct*500,REASON_EFFECT)
end
end
--E-HERO マリシャス・デビル
function c86676862.initial_effect(c)
aux.AddCodeList(c,94820406)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcCodeFun(c,58554959,c86676862.ffilter,1,true,true)
--spsummon condition
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetCode(EFFECT_SPSUMMON_CONDITION)
e2:SetValue(aux.DarkFusionLimit)
c:RegisterEffect(e2)
--Pos Change
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_SET_POSITION)
e3:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(0,LOCATION_MZONE)
e3:SetCondition(c86676862.poscon)
e3:SetValue(POS_FACEUP_ATTACK)
c:RegisterEffect(e3)
--must attack
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_MUST_ATTACK)
e4:SetRange(LOCATION_MZONE)
e4:SetCondition(c86676862.poscon)
e4:SetTargetRange(0,LOCATION_MZONE)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EFFECT_MUST_ATTACK_MONSTER)
e5:SetValue(c86676862.atklimit)
c:RegisterEffect(e5)
end
c86676862.material_setcode=0x8
c86676862.dark_calling=true
function c86676862.ffilter(c)
return c:IsRace(RACE_FIEND) and c:IsLevelAbove(6)
end
function c86676862.poscon(e)
local ph=Duel.GetCurrentPhase()
return Duel.GetTurnPlayer()~=e:GetHandler():GetControler()
and ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE
end
function c86676862.atklimit(e,c)
return c==e:GetHandler()
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