Commit 006c6214 authored by VanillaSalt's avatar VanillaSalt

fix

parent 9363964b
......@@ -20,40 +20,39 @@ function c26268488.initial_effect(c)
local g=Group.CreateGroup()
g:KeepAlive()
e2:SetLabelObject(g)
--negate
--disable
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(26268488,0))
e3:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e3:SetCategory(CATEGORY_DESTROY+CATEGORY_DISABLE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e3:SetCode(EVENT_CHAINING)
e3:SetCountLimit(1)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCondition(c26268488.discon)
e3:SetTarget(c26268488.distg)
e3:SetOperation(c26268488.disop)
c:RegisterEffect(e3)
--Special Summon
--spsummon
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(26268488,1))
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_GRAVE)
e4:SetCost(c26268488.sumcost)
e4:SetTarget(c26268488.sumtg)
e4:SetOperation(c26268488.sumop)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetCost(c26268488.spcost)
e4:SetTarget(c26268488.sptg)
e4:SetOperation(c26268488.spop)
c:RegisterEffect(e4)
end
function c26268488.repfilter(c,tp)
return c:IsControler(tp) and c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:GetFlagEffect(26268488)==0
return c:IsControler(tp) and c:IsOnField() and c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:GetFlagEffect(26268488)==0
end
function c26268488.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:IsExists(c26268488.repfilter,1,nil,tp) end
local g=eg:Filter(c26268488.repfilter,nil,tp)
local tc=g:GetFirst()
while tc do
tc:RegisterFlagEffect(26268488,RESET_EVENT+0x1fc0000+RESET_PHASE+RESET_END,0,1)
tc:RegisterFlagEffect(26268488,RESET_EVENT+0x1fc0000+RESET_PHASE+RESET_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(26268488,2))
tc=g:GetNext()
end
e:GetLabelObject():Clear()
......@@ -65,38 +64,38 @@ function c26268488.repval(e,c)
return g:IsContains(c)
end
function c26268488.discon(e,tp,eg,ep,ev,re,r,rp)
return rp~=tp and re:IsActiveType(TYPE_MONSTER) and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and rp~=tp and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainDisablable(ev)
end
function c26268488.distg(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)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,PLAYER_ALL,LOCATION_ONFIELD)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c26268488.disop(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) then
local g=Duel.SelectMatchingCard(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 then
Duel.Destroy(g,REASON_EFFECT)
end
Duel.NegateEffect(ev)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 then
Duel.Destroy(g,REASON_EFFECT)
end
end
function c26268488.sumcost(e,tp,eg,ep,ev,re,r,rp,chk)
function c26268488.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c26268488.filter(c,e,tp)
function c26268488.spfilter(c,e,tp)
return c:IsSetCard(0xa3) and c:IsLevelBelow(8) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c26268488.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c26268488.filter(chkc,e,tp) end
function c26268488.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c26268488.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c26268488.filter,tp,LOCATION_GRAVE,0,1,e:GetHandler(),e,tp) end
and Duel.IsExistingTarget(c26268488.spfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler(),e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c26268488.filter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler(),e,tp)
local g=Duel.SelectTarget(tp,c26268488.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c26268488.sumop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
function c26268488.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
......
--SNo.0 ホープ・ゼアル
--SNo.0 ホープ・ゼアル
function c52653092.initial_effect(c)
--xyz summon
c:EnableReviveLimit()
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetRange(LOCATION_EXTRA)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetCondition(c52653092.xyzcon)
e1:SetOperation(c52653092.xyzop)
e1:SetValue(SUMMON_TYPE_XYZ)
c:RegisterEffect(e1)
--cannot disable
--cannot disable spsummon
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CANNOT_DISABLE_SPSUMMON)
e2:SetCondition(c52653092.ndcon)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetCondition(c52653092.effcon)
c:RegisterEffect(e2)
--activate limit
--summon success
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetOperation(c52653092.sumop)
e3:SetCondition(c52653092.effcon2)
e3:SetOperation(c52653092.spsumsuc)
c:RegisterEffect(e3)
--atk/def up
--atk & def
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_UPDATE_ATTACK)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetRange(LOCATION_MZONE)
e4:SetValue(c52653092.val)
e4:SetValue(c52653092.atkval)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EFFECT_UPDATE_DEFENCE)
......@@ -42,9 +44,9 @@ function c52653092.initial_effect(c)
e6:SetRange(LOCATION_MZONE)
e6:SetHintTiming(0,TIMING_DRAW_PHASE)
e6:SetCountLimit(1)
e6:SetCondition(c52653092.nacon)
e6:SetCost(c52653092.nacost)
e6:SetOperation(c52653092.naop)
e6:SetCondition(c52653092.actcon)
e6:SetCost(c52653092.actcost)
e6:SetOperation(c52653092.actop)
c:RegisterEffect(e6)
end
c52653092.xyz_number=0
......@@ -54,8 +56,8 @@ end
function c52653092.ovfilter(c)
return c:IsFaceup() and c:IsSetCard(0x7f)
end
function c52653092.mfilter(c)
return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsSetCard(0x48)
function c52653092.mfilter(c,xyzc)
return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsSetCard(0x48) and c:IsCanBeXyzMaterial(xyzc)
end
function c52653092.xyzfilter1(c,g)
return g:IsExists(c52653092.xyzfilter2,2,c,c:GetRank())
......@@ -68,23 +70,23 @@ function c52653092.xyzcon(e,c,og)
local tp=c:GetControler()
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local ct=-ft
if ct>=2 then return false end
if 3<=ct then return false end
if ct<1 and Duel.IsExistingMatchingCard(aux.XyzAlterFilter,tp,LOCATION_MZONE,0,1,nil,c52653092.ovfilter,c)
and Duel.IsExistingMatchingCard(c52653092.cfilter,tp,LOCATION_HAND,0,1,nil) then
return true
end
local mg=Duel.GetMatchingGroup(c52653092.mfilter,tp,LOCATION_MZONE,0,nil)
return mg:IsExists(c5727.xyzfilter1,1,nil,mg)
local mg=Duel.GetMatchingGroup(c52653092.mfilter,tp,LOCATION_MZONE,0,nil,c)
return mg:IsExists(c52653092.xyzfilter1,1,nil,mg)
end
function c52653092.xyzop(e,tp,eg,ep,ev,re,r,rp,c,og)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local ct=-ft
local mg=Duel.GetMatchingGroup(c52653092.mfilter,tp,LOCATION_MZONE,0,nil)
local mg=Duel.GetMatchingGroup(c52653092.mfilter,tp,LOCATION_MZONE,0,nil,c)
local b1=mg:IsExists(c52653092.xyzfilter1,1,nil,mg)
local b2=ct<1 and Duel.IsExistingMatchingCard(aux.XyzAlterFilter,tp,LOCATION_MZONE,0,1,nil,c52653092.ovfilter,c)
and Duel.IsExistingMatchingCard(c52653092.cfilter,tp,LOCATION_HAND,0,1,nil)
if b2 and (not b1 or Duel.SelectYesNo(tp,aux.Stringid(52653092,0))) then
Duel.DiscardHand(tp,c52653092.cfilter,1,1,REASON_COST+REASON_DISCARD)
Duel.DiscardHand(tp,c52653092.cfilter,1,1,REASON_COST+REASON_DISCARD,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local g=Duel.SelectMatchingCard(tp,aux.XyzAlterFilter,tp,LOCATION_MZONE,0,1,1,nil,c52653092.ovfilter,c)
local g2=g:GetFirst():GetOverlayGroup()
......@@ -110,32 +112,33 @@ function c52653092.xyzop(e,tp,eg,ep,ev,re,r,rp,c,og)
Duel.Overlay(c,g1)
end
end
function c52653092.ndcon(e,tp,eg,ep,ev,re,r,rp)
function c52653092.effcon(e)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_XYZ
end
function c52653092.effcon2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_XYZ
end
function c52653092.sumop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():GetSummonType()~=SUMMON_TYPE_XYZ then return end
Duel.SetChainLimitTillChainEnd(c52653092.chainlm)
function c52653092.spsumsuc(e,tp,eg,ep,ev,re,r,rp)
Duel.SetChainLimitTillChainEnd(c52653092.chlimit)
end
function c52653092.chainlm(e,rp,tp)
return tp==rp
function c52653092.chlimit(e,ep,tp)
return tp==ep
end
function c52653092.val(e,c)
function c52653092.atkval(e,c)
return c:GetOverlayCount()*1000
end
function c52653092.nacon(e,tp,eg,ep,ev,re,r,rp)
function c52653092.actcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
end
function c52653092.nacost(e,tp,eg,ep,ev,re,r,rp,chk)
function c52653092.actcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c52653092.naop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
function c52653092.actop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(0,1)
e1:SetValue(aux.TRUE)
e1:SetReset(RESET_PHASE+PHASE_END)
......
......@@ -5,9 +5,9 @@ function c53485634.initial_effect(c)
e1:SetDescription(aux.Stringid(53485634,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetRange(LOCATION_HAND)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCondition(c53485634.spcon)
e1:SetTarget(c53485634.sptg)
e1:SetOperation(c53485634.spop)
......@@ -17,56 +17,65 @@ function c53485634.initial_effect(c)
e2:SetDescription(aux.Stringid(53485634,1))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c53485634.sumcon)
e2:SetCost(c53485634.sumcost)
e2:SetOperation(c53485634.sumop)
c:RegisterEffect(e2)
end
function c53485634.cfilter(c,tp)
return c:IsLevelBelow(7) and c:IsSetCard(0x3b) and c:GetPreviousControler()==tp
and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousLocation(LOCATION_MZONE)
and c:IsReason(REASON_EFFECT+REASON_BATTLE) and c:GetReasonPlayer()~=tp and c:IsControler(tp)
function c53485634.spfilter(c,e,tp)
return c:IsPreviousPosition(POS_FACEUP) and c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_MZONE)
and c:IsReason(REASON_DESTROY) and (c:IsReason(REASON_EFFECT) or (c:IsReason(REASON_BATTLE) and Duel.GetAttacker():IsControler(1-tp)))
and c:IsSetCard(0x3b) and c:IsLevelBelow(7) and c:IsControler(tp)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c53485634.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c53485634.cfilter,1,nil,tp)
return rp~=tp
end
function c53485634.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanSpecialSummonCount(tp,2)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false)
and eg:IsExists(c53485634.spfilter,1,nil,e,tp) end
local g=eg:Filter(c53485634.spfilter,nil,e,tp)
Duel.SetTargetCard(g)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c53485634.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false,c:GetPreviousPosition())
function c53485634.filter(c,e,tp)
return c:IsRelateToEffect(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c53485634.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_DEFENCE)~=0 then
local g=eg:Filter(c5724.spfilter,nil,e,tp)
if not c:IsRelateToEffect(e) then return end
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(c53485634.filter,nil,e,tp)
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_DEFENCE)~=0 then
local ct=Duel.GetLocationCount(tp,LOCATION_MZONE)
if g:GetCount()<=0 or ct<=0 then return end
if ct<=0 or g:GetCount()==0 then return end
if g:GetCount()>ct then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
g=g:Select(tp,ct,ct,nil)
end
local tc=g:GetFirst()
while tc do
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,tc:GetPreviousPosition())
local pos=tc:GetPreviousPosition()
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,pos)
tc=g:GetNext()
end
Duel.SpecialSummonComplete()
end
end
function c53485634.sumcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,53485634)==0
end
function c53485634.sumcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
end
function c53485634.sumop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(tp,53485634)~=0 then return end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetTargetRange(LOCATION_HAND,0)
e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT)
e1:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0)
e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x3b))
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
......
......@@ -7,43 +7,54 @@ function c88757791.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--scale change
--change scale
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(88757791,0))
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_PZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1)
e2:SetTarget(c88757791.target)
e2:SetOperation(c88757791.operation)
e2:SetTarget(c88757791.sctg)
e2:SetOperation(c88757791.scop)
c:RegisterEffect(e2)
--summon success
--indes
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetOperation(c88757791.sumsuc)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e4:SetRange(LOCATION_MZONE)
e4:SetTargetRange(LOCATION_MZONE,0)
e4:SetCondition(c88757791.indcon)
e4:SetTarget(c88757791.indtg)
e4:SetValue(c88757791.indval)
c:RegisterEffect(e4)
end
function c88757791.cffilter(c,tp)
function c88757791.cfilter(c,tp)
return c:IsType(TYPE_PENDULUM) and not c:IsPublic()
and Duel.IsExistingTarget(c88757791.filter,tp,LOCATION_SZONE,0,1,nil,c)
and Duel.IsExistingTarget(c88757791.scfilter,tp,LOCATION_SZONE,0,1,nil,c)
end
function c88757791.filter(c,pc)
return c:IsFaceup() and c:IsSetCard(0x98)
and ((c:GetSequence()==6 and c:GetLeftScale()~=pc:GetOriginalLeftScale())
or (c:GetSequence()==7 and c:GetRightScale()~=pc:GetOriginalRightScale()))
function c88757791.scfilter(c,pc)
return c:IsSetCard(0x98)
and ((pc:GetSequence()==6 and c:GetLeftScale()~=pc:GetLeftScale())
or (pc:GetSequence()==7 and c:GetRightScale()~=pc:GetRightScale()))
end
function c88757791.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_SZONE) and c88757791.filter(chkc,e:GetLabelObject()) end
if chk==0 then return Duel.IsExistingMatchingCard(c88757791.cffilter,tp,LOCATION_HAND,0,1,nil,tp) end
local g=Duel.SelectMatchingCard(tp,c88757791.cffilter,tp,LOCATION_HAND,0,1,1,nil,tp)
local tc=g:GetFirst()
e:SetLabelObject(tc)
Duel.ConfirmCards(1-tp,tc)
function c88757791.sctg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_SZONE) and c88757791.scfilter(chkc,e:GetLabelObject()) end
if chk==0 then return Duel.IsExistingMatchingCard(c88757791.cfilter,tp,LOCATION_HAND,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local cg=Duel.SelectMatchingCard(tp,c88757791.cfilter,tp,LOCATION_HAND,0,1,1,nil,tp)
Duel.ConfirmCards(1-tp,cg)
Duel.ShuffleHand(tp)
e:SetLabelObject(cg:GetFirst())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c88757791.filter,tp,LOCATION_SZONE,0,1,1,nil,tc)
Duel.SelectTarget(tp,c88757791.scfilter,tp,LOCATION_SZONE,0,1,1,nil,cg:GetFirst())
end
function c88757791.operation(e,tp,eg,ep,ev,re,r,rp)
function c88757791.scop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget()
local pc=e:GetLabelObject()
......@@ -51,29 +62,24 @@ function c88757791.operation(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LSCALE)
e1:SetValue(pc:GetOriginalLeftScale())
e1:SetValue(pc:GetLeftScale())
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_CHANGE_RSCALE)
e2:SetValue(pc:GetOriginalRightScale())
e2:SetValue(pc:GetRightScale())
tc:RegisterEffect(e2)
end
end
function c88757791.sumsuc(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RegisterFlagEffect(88757791,RESET_EVENT+0x1ec0000+RESET_PHASE+PHASE_END,0,1)
end
function c88757791.indcon(e)
local c=e:GetHandler()
if c:GetSummonType()~=SUMMON_TYPE_PENDULUM then return end
--indes
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x98))
e1:SetValue(c88757791.indval)
e1:SetReset(RESET_EVENT+0x1ec0000+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1,true)
return c:GetFlagEffect(88757791)~=0 and c:GetSummonType()==SUMMON_TYPE_PENDULUM
end
function c88757791.indtg(e,c)
return c:IsSetCard(0x98) and c:IsType(TYPE_PENDULUM)
end
function c88757791.indval(e,re,rp)
return rp~=e:GetHandlerPlayer()
......
--M・HERO ブラスト
--M・HERO ブラスト
function c89870349.initial_effect(c)
c:EnableReviveLimit()
--spsummon condition
--special summon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE)
c:RegisterEffect(e1)
--atk down
--atk
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(89870349,0))
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetTarget(c89870349.atktg)
e2:SetOperation(c89870349.atkop)
c:RegisterEffect(e2)
......@@ -43,8 +43,8 @@ function c89870349.atkop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetValue(tc:GetAttack()/2)
e1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1)
end
end
......@@ -60,7 +60,7 @@ function c89870349.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingTarget(c89870349.thfilter,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,c89870349.thfilter,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c89870349.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
......
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