Commit 08b913a5 authored by wind2009's avatar wind2009

Fix

parent 6efa413c
Pipeline #43598 passed with stages
in 3 minutes and 40 seconds
No preview for this file type
...@@ -32,17 +32,17 @@ function s.initial_effect(c) ...@@ -32,17 +32,17 @@ function s.initial_effect(c)
e4:SetOperation(s.sumsuc) e4:SetOperation(s.sumsuc)
c:RegisterEffect(e4) c:RegisterEffect(e4)
--remove --remove
local e4=Effect.CreateEffect(c) local e5=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,1)) e5:SetDescription(aux.Stringid(id,1))
e4:SetCategory(CATEGORY_REMOVE+CATEGORY_DAMAGE) e5:SetCategory(CATEGORY_REMOVE+CATEGORY_DAMAGE)
e4:SetType(EFFECT_TYPE_IGNITION) e5:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_MZONE) e5:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,id) e5:SetCountLimit(1,id)
e4:SetCondition(s.rmcon) e5:SetCondition(s.rmcon)
e4:SetCost(s.rmcost) e5:SetCost(s.rmcost)
e4:SetTarget(s.rmtg) e5:SetTarget(s.rmtg)
e4:SetOperation(s.rmop) e5:SetOperation(s.rmop)
c:RegisterEffect(e4) c:RegisterEffect(e5)
end end
function s.spcostfilter(c) function s.spcostfilter(c)
return c:IsAbleToRemoveAsCost() and c:IsAttribute(ATTRIBUTE_LIGHT+ATTRIBUTE_DARK) return c:IsAbleToRemoveAsCost() and c:IsAttribute(ATTRIBUTE_LIGHT+ATTRIBUTE_DARK)
...@@ -90,8 +90,11 @@ function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -90,8 +90,11 @@ function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,nil) end
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,nil) local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,g:GetCount()*500)
end end
function s.rmop(e,tp,eg,ep,ev,re,r,rp) function s.rmop(e,tp,eg,ep,ev,re,r,rp)
local ckg=Duel.GetFieldGroup(tp,0,LOCATION_GRAVE)
if aux.NecroValleyNegateCheck(ckg) then return end
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,nil) local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,nil)
if g:GetCount()>0 and Duel.Remove(g,POS_FACEUP,REASON_EFFECT)~=0 then if g:GetCount()>0 and Duel.Remove(g,POS_FACEUP,REASON_EFFECT)~=0 then
local dam=Duel.GetOperatedGroup():GetCount() local dam=Duel.GetOperatedGroup():GetCount()
......
--HRUM-アルティメット・フォース --HRUMアルティメット・フォース
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
--Activate --Activate
...@@ -15,7 +15,7 @@ function s.initial_effect(c) ...@@ -15,7 +15,7 @@ function s.initial_effect(c)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1)) e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_DESTROY) e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_XMATERIAL+EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_XMATERIAL+EFFECT_TYPE_QUICK_F)
e2:SetCode(EVENT_CHAINING) e2:SetCode(EVENT_CHAINING)
e2:SetCountLimit(1,EFFECT_COUNT_CODE_CHAIN) e2:SetCountLimit(1,EFFECT_COUNT_CODE_CHAIN)
e2:SetCondition(s.descon) e2:SetCondition(s.descon)
...@@ -40,9 +40,10 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -40,9 +40,10 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end end
function s.activate(e,tp,eg,ep,ev,re,r,rp) function s.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if not aux.MustMaterialCheck(tc,tp,EFFECT_MUST_BE_XMATERIAL) then return end if not aux.MustMaterialCheck(tc,tp,EFFECT_MUST_BE_XMATERIAL) then return end
if tc:IsFacedown() or not tc:IsRelateToEffect(e) or tc:IsControler(1-tp) or tc:IsImmuneToEffect(e) then return end if tc:IsFacedown() or not tc:IsRelateToChain() or tc:IsControler(1-tp) or tc:IsImmuneToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc) local g=Duel.SelectMatchingCard(tp,s.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc)
local sc=g:GetFirst() local sc=g:GetFirst()
...@@ -62,18 +63,18 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -62,18 +63,18 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function s.descon(e,tp,eg,ep,ev,re,r,rp) function s.descon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase() local c=e:GetHandler()
return c:IsSetCard(0x2048) return Duel.IsBattlePhase() and c:IsSetCard(0x2048)
and not c:IsStatus(STATUS_BATTLE_DESTROYED) and ep~=tp and re:IsActiveType(TYPE_MONSTER) and ph>PHASE_MAIN1 and ph<PHASE_MAIN2 and not c:IsStatus(STATUS_BATTLE_DESTROYED) and ep~=tp and re:IsActiveType(TYPE_MONSTER)
end end
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) function s.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_MZONE,1,nil) end if chk==0 then return true end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_MZONE,nil) 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_DESTROY,g,g:GetCount(),0,0)
end end
function s.desop(e,tp,eg,ep,ev,re,r,rp) function s.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToChain() then if c:IsRelateToChain() then
local og=c:GetOverlayGroup() local og=c:GetOverlayGroup()
if og:GetCount()==0 then return end if og:GetCount()==0 then return end
......
...@@ -16,7 +16,6 @@ function s.initial_effect(c) ...@@ -16,7 +16,6 @@ function s.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=e1:Clone() local e2=e1:Clone()
e2:SetCode(EVENT_DAMAGE_STEP_END) e2:SetCode(EVENT_DAMAGE_STEP_END)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCondition(s.descon2) e2:SetCondition(s.descon2)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--attribute --attribute
...@@ -57,13 +56,17 @@ function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -57,13 +56,17 @@ function s.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end end
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,g:FilterCount(Card.IsType,nil,TYPE_LINK)*300) local dam=Duel.GetMatchingGroupCount(Card.IsType,tp,LOCATION_GRAVE,0,nil,TYPE_LINK)*300
if dam>0 then
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam)
end
end end
function s.desop(e,tp,eg,ep,ev,re,r,rp) function s.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_MZONE,nil)
if Duel.Destroy(g,REASON_EFFECT)~=0 then if Duel.Destroy(g,REASON_EFFECT)~=0 then
local ct=Duel.GetMatchingGroupCount(Card.IsType,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil,TYPE_LINK) local ct=Duel.GetMatchingGroupCount(Card.IsType,tp,LOCATION_GRAVE,0,nil,TYPE_LINK)
if ct>0 then if ct>0 then
Duel.BreakEffect()
Duel.Damage(1-tp,ct*300,REASON_EFFECT) Duel.Damage(1-tp,ct*300,REASON_EFFECT)
end end
end end
...@@ -74,14 +77,15 @@ function s.immval(e,te) ...@@ -74,14 +77,15 @@ function s.immval(e,te)
end end
function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
local atk=c:GetAttack()
if chk==0 then return c:IsReason(REASON_BATTLE+REASON_EFFECT) and not c:IsReason(REASON_REPLACE) if chk==0 then return c:IsReason(REASON_BATTLE+REASON_EFFECT) and not c:IsReason(REASON_REPLACE)
and c:IsAttackAbove(1000) and not c:IsHasEffect(EFFECT_REVERSE_UPDATE) end and atk>=1000 end
if Duel.SelectEffectYesNo(tp,e:GetHandler(),96) then if Duel.SelectEffectYesNo(tp,e:GetHandler(),96) then
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
e1:SetValue(-1000) e1:SetValue(atk-1000)
c:RegisterEffect(e1) c:RegisterEffect(e1)
return true return true
else return false end else return false 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