Commit a59349cb authored by mercury233's avatar mercury233

fix

parent 6c3fb8ec
Pipeline #23284 passed with stages
in 30 seconds
#The first line is used for comment
!counter 0x169 指示物(吠陀-优婆尼沙昙)
!counter 0x170 响鸣指示物
!setname 0x4073 铠装超量 アーマード・エクシーズ
!setname 0x29a 吠陀 ヴェーダ
!setname 0x29b 哈特 ハート
......
......@@ -96,7 +96,7 @@ end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_GRAVE,0,1,e:GetLabel(),nil,e,tp)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
function s.chk(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -40,7 +40,7 @@ end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local dc=Duel.SelectMatchingCard(tp,s.dfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil,e,tp):GetFirst()
if Duel.Destroy(dc,REASON_EFFECT)<1 then return end
if dc==nil or Duel.Destroy(dc,REASON_EFFECT)<1 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local tc=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp,dc):GetFirst()
if tc then
......
......@@ -10,7 +10,7 @@ function s.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_LEAVE_FIELD)
e1:SetCountLimit(1,id)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCondition(s.condition)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
......
......@@ -44,11 +44,10 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) or Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)<1
or not tc:IsLocation(LOCATION_REMOVED) then return end
--snip 1: edited from "Bending Destiny"
tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY,0,2)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCountLimit(1)
e1:SetLabel(Duel.GetTurnCount())
......@@ -64,7 +63,6 @@ function s.retcon(e,tp,eg,ep,ev,re,r,rp)
end
function s.retop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
--end snip 1
Duel.SpecialSummon(tc,0,tp,tc:GetOwner(),false,false,POS_FACEUP)
end
function s.sfilter(c,e,tp)
......
......@@ -68,7 +68,7 @@ function s.ctop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():AddCounter(0x170,1)
end
function s.adval(e,c)
return Duel.GetCounter(e:GetHandlerPlayer(),1,0,0x170)
return Duel.GetCounter(e:GetHandlerPlayer(),1,0,0x170)*-100
end
function s.pzcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
......
......@@ -50,7 +50,8 @@ end
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) end
local ct=0
for i=0,1 do ct=ct+Duel.GetFieldCard(tp,LOCATION_PZONE,i):GetCounter(0x170) end
local g=Duel.GetFieldGroup(tp,LOCATION_PZONE,0)
for tc in aux.Next(g) do ct=ct+tc:GetCounter(0x170) end
if chk==0 then return ct>0 and Duel.IsExistingTarget(nil,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,nil,tp,0,LOCATION_MZONE,1,ct,nil)
......
......@@ -17,11 +17,11 @@ function s.initial_effect(c)
c:SetSPSummonOnce(id)
--destroy replace
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EFFECT_DESTROY_REPLACE)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetTarget(s.desreptg)
e2:SetValue(s.desrepval)
e2:SetOperation(s.desrepop)
c:RegisterEffect(e2)
--copy
......@@ -44,7 +44,7 @@ function s.spcost(e,c,tp,st)
if st&SUMMON_TYPE_LINK~=SUMMON_TYPE_LINK then return true end
return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_PZONE,0,1,nil)
end
function s.chk(g,tp)
function s.desrepchk(g,tp)
local tl=0
for tc in aux.Next(g) do
local ct=0
......@@ -55,14 +55,22 @@ function s.chk(g,tp)
end
return tl>2
end
function s.desrepfilter(c,tp)
return c:IsReason(REASON_BATTLE+REASON_EFFECT) and not c:IsReason(REASON_REPLACE)
and c:IsControler(tp) and c:IsOnField()
end
function s.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local g=Duel.GetFieldGroup(tp,LOCATION_PZONE,0)
if chk==0 then return c:IsReason(REASON_BATTLE+REASON_EFFECT) and not c:IsReason(REASON_REPLACE)
and g:CheckSubGroup(s.chk,1,99) end
if chk==0 then return eg:IsExists(s.desrepfilter,1,nil,tp)
and g:CheckSubGroup(s.desrepchk,1,2) end
return Duel.SelectEffectYesNo(tp,c,96)
end
function s.desrepval(e,c)
return s.desrepfilter(c,e:GetHandlerPlayer())
end
function s.desrepop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,id)
local g=Duel.GetFieldGroup(tp,LOCATION_PZONE,0)
local ct=0
while ct<3 do
......
......@@ -79,9 +79,9 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp)
if ct<2 then return false end
local te,p=Duel.GetChainInfo(ct-1,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
if not te then return false end
local loc1=te:GetHandler():IsSetCard(0x17e) and not te:GetHandler():IsCode(id)
local loc2=te:GetActiveType()==TYPE_TRAP and te:IsHasType(EFFECT_TYPE_ACTIVATE)
return (loc1 or loc2) and p==tp and rp==1-tp
local b1=te:GetHandler():IsSetCard(0x17e) and not te:GetHandler():IsCode(id)
local b2=te:GetActiveType()==TYPE_TRAP
return (b1 or b2) and p==tp and rp==1-tp
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
......@@ -26,7 +26,7 @@ function s.initial_effect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SUMMON_SUCCESS)
e3:SetRange(LOCATION_FZONE)
e3:SetCountLimit(1)
e3:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e3:SetCondition(s.spcon)
e3:SetTarget(s.sptg)
......
......@@ -43,7 +43,7 @@ function s.initial_effect(c)
e5:SetDescription(aux.Stringid(id,3))
e5:SetCategory(CATEGORY_SPECIAL_SUMMON)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e5:SetProperty(EFFECT_FLAG_DELAY)
e5:SetCode(EVENT_DESTROYED)
e5:SetTarget(s.sptg2)
e5:SetOperation(s.spop2)
......
......@@ -80,7 +80,7 @@ function s.recop(e,tp,eg,ep,ev,re,r,rp)
Duel.Recover(1-tp,3000,REASON_EFFECT)
end
function s.spfgfilter(c,tp,se)
return c:IsFaceup() and c:IsSummonPlayer(tp) and c:IsSetCard(0x2a4) and c:IsType(TYPE_MONSTER)
return c:IsFaceup() and c:IsSummonPlayer(tp) and c:IsCode(78371393) and c:IsType(TYPE_MONSTER)
and (se==nil or c:GetReasonEffect()~=se)
end
function s.spfgcon(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -45,11 +45,11 @@ function s.dfilter(c,e,tp)
return c:IsFaceupEx() and c:IsType(TYPE_MONSTER) and c:IsAttribute(ATTRIBUTE_DARK)
end
function s.thfilter(c,code)
return (c:IsSetCard(0x2a4) or aux.IsSetNameMonsterListed(c,0x2a4)) and c:IsAbleToHand() and not c:IsCode(code)
return (c:IsCode(78371393) or aux.IsCodeListed(c,78371393)) and c:IsAbleToHand() and not c:IsCode(id)
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.dfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil,e,tp)
and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil,e:GetHandler():GetCode()) end
and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,tp,LOCATION_HAND+LOCATION_MZONE)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
......
--ユベル-Das Abscheulich Ritter
function c4779091.initial_effect(c)
aux.AddCodeList(c,78371393)
c:EnableReviveLimit()
--battle
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_AVOID_BATTLE_DAMAGE)
e1:SetValue(1)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetValue(1)
c:RegisterEffect(e2)
--damage
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(4779091,0))
e3:SetCategory(CATEGORY_DAMAGE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_BATTLE_CONFIRM)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCondition(c4779091.damcon)
e3:SetTarget(c4779091.damtg)
e3:SetOperation(c4779091.damop)
c:RegisterEffect(e3)
--destroy
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_RELEASE+CATEGORY_DESTROY)
e4:SetDescription(aux.Stringid(4779091,1))
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1)
e4:SetCode(EVENT_PHASE+PHASE_END)
e4:SetCondition(c4779091.descon)
e4:SetTarget(c4779091.destg)
e4:SetOperation(c4779091.desop)
c:RegisterEffect(e4)
--special summon
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(4779091,2))
e5:SetCategory(CATEGORY_SPECIAL_SUMMON)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetCode(EVENT_LEAVE_FIELD)
e5:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e5:SetCondition(c4779091.spcon)
e5:SetTarget(c4779091.sptg)
e5:SetOperation(c4779091.spop)
c:RegisterEffect(e5)
--cannot special summon
local e6=Effect.CreateEffect(c)
e6:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e6)
end
function c4779091.damcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler()==Duel.GetAttackTarget()
end
function c4779091.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAttackPos() end
Duel.SetTargetPlayer(1-tp)
local atk=Duel.GetAttacker():GetAttack()
Duel.SetTargetParam(atk)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,atk)
end
function c4779091.damop(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 c4779091.descon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c4779091.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c4779091.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,aux.ExceptThisCard(e))
Duel.Destroy(g,REASON_EFFECT)
end
function c4779091.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousPosition(POS_FACEUP)
end
function c4779091.filter(c,e,tp)
return c:IsCode(31764700) and c:IsCanBeSpecialSummoned(e,0,tp,true,true)
end
function c4779091.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c4779091.filter,tp,0x13,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0x13)
end
function c4779091.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c4779091.filter),tp,0x13,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,true,true,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