Commit 451c624b authored by wind2009's avatar wind2009

Fix 剛鬼

parent d4d1a5f7
Pipeline #37389 passed with stages
in 3 minutes and 47 seconds
No preview for this file type
...@@ -63,9 +63,9 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -63,9 +63,9 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetAbsoluteRange(tp,1,0) e1:SetAbsoluteRange(tp,1,0)
e1:SetTarget(s.splimit) e1:SetTarget(s.splimit)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_CONTROL)
tc:RegisterEffect(e1,true) tc:RegisterEffect(e1,true)
tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,2)) tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_CONTROL,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,2))
end end
end end
end end
...@@ -76,7 +76,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -76,7 +76,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end end
function s.thfilter(c) function s.thfilter(c)
return c:IsSetCard(0xfc) and not c:IsCode(7540107) and c:IsAbleToHand() return c:IsSetCard(0xfc) and not c:IsCode(id) and c:IsAbleToHand()
end end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
......
...@@ -3,15 +3,23 @@ local s,id,o=GetID() ...@@ -3,15 +3,23 @@ local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
aux.AddFusionProcFun2(c,s.matfilter1,aux.FilterBoolFunction(Card.IsRace,RACE_WARRIOR+RACE_DINOSAUR+RACE_CYBERSE),true) aux.AddFusionProcFun2(c,s.matfilter1,aux.FilterBoolFunction(Card.IsRace,RACE_WARRIOR+RACE_DINOSAUR+RACE_CYBERSE),true)
--mat check
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_MATERIAL_CHECK)
e0:SetValue(s.matcheck)
c:RegisterEffect(e0)
--destroy --destroy
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY) e1:SetCategory(CATEGORY_DESTROY)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,id)
e1:SetCondition(s.descon) e1:SetCondition(s.descon)
e1:SetTarget(s.destg) e1:SetTarget(s.destg)
e1:SetOperation(s.desop) e1:SetOperation(s.desop)
e1:SetLabelObject(e0)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--actlimit --actlimit
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
...@@ -27,22 +35,32 @@ end ...@@ -27,22 +35,32 @@ end
function s.matfilter1(c) function s.matfilter1(c)
return c:IsFusionType(TYPE_LINK) and c:IsFusionSetCard(0xfc) return c:IsFusionType(TYPE_LINK) and c:IsFusionSetCard(0xfc)
end end
function s.matcheck(e,c)
local ct=c:GetMaterial():Filter(Card.IsSetCard,nil,0xfc):GetSum(Card.GetLink)
local lim=0
if c:GetMaterial():IsExists(s.limfilter,1,nil) then
lim=1
end
e:SetLabel(ct,lim)
end
function s.limfilter(c)
return c:IsLinkAbove(3)
end
function s.descon(e,tp,eg,ep,ev,re,r,rp) function s.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION) return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION)
end end
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() end if chkc then return chkc:IsOnField() end
local sg=e:GetHandler():GetMaterial() local ct,lim=e:GetLabelObject():GetLabel()
local ct=sg:Filter(Card.IsSetCard,nil,0xfc):GetSum(Card.GetLink)
if chk==0 then return ct>0 if chk==0 then return ct>0
and Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end and Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,ct,nil) local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,ct,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
if sg:IsExists(s.limfilter,1,nil) then if lim>0 then
g:KeepAlive() g:KeepAlive()
Duel.SetChainLimit(s.limit(g)) Duel.SetChainLimit(s.limit(g))
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(RESET_CHAIN) e1:SetCode(RESET_CHAIN)
...@@ -53,9 +71,6 @@ function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -53,9 +71,6 @@ function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
end end
end end
function s.limfilter(c)
return c:IsLinkAbove(3)
end
function s.limit(g) function s.limit(g)
return function (e,lp,tp) return function (e,lp,tp)
return not g:IsContains(e:GetHandler()) return not g:IsContains(e:GetHandler())
......
...@@ -47,7 +47,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -47,7 +47,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function s.tgfilter(c,tp) function s.tgfilter(c,tp)
return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsAbleToDeck() return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsFaceup()
and Duel.IsExistingMatchingCard(s.thfilter2,tp,LOCATION_GRAVE,0,1,nil,c:GetAttack()) and Duel.IsExistingMatchingCard(s.thfilter2,tp,LOCATION_GRAVE,0,1,nil,c:GetAttack())
end end
function s.thfilter2(c,atk) function s.thfilter2(c,atk)
...@@ -56,15 +56,14 @@ function s.thfilter2(c,atk) ...@@ -56,15 +56,14 @@ function s.thfilter2(c,atk)
end end
function s.thtg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.thtg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.tgfilter(chkc,tp) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.tgfilter(chkc,tp) end
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) if chk==0 then return Duel.IsExistingTarget(s.tgfilter,tp,LOCATION_MZONE,0,1,nil,tp) end
and Duel.IsExistingTarget(s.tgfilter,tp,LOCATION_MZONE,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,s.tgfilter,tp,LOCATION_MZONE,0,1,1,nil,tp) Duel.SelectTarget(tp,s.tgfilter,tp,LOCATION_MZONE,0,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end end
function s.thop2(e,tp,eg,ep,ev,re,r,rp) function s.thop2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToChain() then if tc:IsRelateToChain() and tc:IsFaceup() and tc:IsType(TYPE_MONSTER) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter2),tp,LOCATION_GRAVE,0,1,1,nil,tc:GetAttack()) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter2),tp,LOCATION_GRAVE,0,1,1,nil,tc:GetAttack())
if g:GetCount()>0 then if g:GetCount()>0 then
...@@ -76,9 +75,10 @@ function s.thop2(e,tp,eg,ep,ev,re,r,rp) ...@@ -76,9 +75,10 @@ function s.thop2(e,tp,eg,ep,ev,re,r,rp)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(0,LOCATION_MZONE) e1:SetTargetRange(0,LOCATION_MZONE)
e1:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET) e1:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_CONTROL)
e1:SetValue(s.atlimit) e1:SetValue(s.atlimit)
tc:RegisterEffect(e1,true) tc:RegisterEffect(e1,true)
tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_CONTROL,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,2))
end end
end end
function s.atlimit(e,c) function s.atlimit(e,c)
......
-- --剛鬼シーク・オーガ
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
--link summon --link summon
...@@ -7,7 +7,7 @@ function s.initial_effect(c) ...@@ -7,7 +7,7 @@ function s.initial_effect(c)
--special summon --special summon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0)) e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_TO_HAND) e1:SetCode(EVENT_TO_HAND)
...@@ -29,9 +29,8 @@ function s.initial_effect(c) ...@@ -29,9 +29,8 @@ function s.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function s.trigfilter(c,tp) function s.trigfilter(c,tp)
return c:IsSetCard(0xfc) and c:IsControler(tp) and c:IsType(TYPE_MONSTER) and not c:IsReason(REASON_DRAW) return c:IsSetCard(0xfc) and c:IsControler(tp) and c:IsPreviousLocation(LOCATION_DECK) and not c:IsReason(REASON_DRAW)
and not (c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEDOWN) and not c:IsPublic()) and c:IsType(TYPE_MONSTER) and not c:IsStatus(STATUS_TO_HAND_WITHOUT_CONFIRM)
and (not c:IsStatus(STATUS_TO_HAND_WITHOUT_CONFIRM) or (c:IsStatus(STATUS_TO_HAND_WITHOUT_CONFIRM) and c:IsPublic()))
end end
function s.spcon(e,tp,eg,ep,ev,re,r,rp) function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(s.trigfilter,1,nil,tp) return eg:IsExists(s.trigfilter,1,nil,tp)
...@@ -42,6 +41,7 @@ end ...@@ -42,6 +41,7 @@ end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end end
function s.spop(e,tp,eg,ep,ev,re,r,rp) function s.spop(e,tp,eg,ep,ev,re,r,rp)
...@@ -61,9 +61,9 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -61,9 +61,9 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetAbsoluteRange(tp,1,0) e1:SetAbsoluteRange(tp,1,0)
e1:SetTarget(s.splimit) e1:SetTarget(s.splimit)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_CONTROL)
tc:RegisterEffect(e1,true) tc:RegisterEffect(e1,true)
tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,2)) tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_CONTROL,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,2))
end end
end end
end end
...@@ -93,6 +93,7 @@ function s.fsptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -93,6 +93,7 @@ function s.fsptg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
return res return res
end end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
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.fspop(e,tp,eg,ep,ev,re,r,rp) function s.fspop(e,tp,eg,ep,ev,re,r,rp)
......
-- --剛鬼闘魂
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
...@@ -29,7 +30,7 @@ end ...@@ -29,7 +30,7 @@ end
function s.activate(e,tp,eg,ep,ev,re,r,rp) function s.activate(e,tp,eg,ep,ev,re,r,rp)
local cg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_HAND,0,nil,e,tp) local cg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_HAND,0,nil,e,tp)
if #cg>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if #cg>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=cg:Select(tp,1,1,nil) local sg=cg:Select(tp,1,1,nil)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP_DEFENSE) Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
...@@ -47,7 +48,6 @@ end ...@@ -47,7 +48,6 @@ end
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,s.costfilter,1,nil,e,tp) end if chk==0 then return Duel.CheckReleaseGroup(tp,s.costfilter,1,nil,e,tp) end
local g=Duel.SelectReleaseGroup(tp,s.costfilter,1,1,nil,e,tp) local g=Duel.SelectReleaseGroup(tp,s.costfilter,1,1,nil,e,tp)
e:SetLabel(g:GetFirst():GetOriginalLevel())
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
end end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
......
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