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)
e1:SetRange(LOCATION_MZONE)
e1:SetAbsoluteRange(tp,1,0)
e1:SetTarget(s.splimit)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_CONTROL)
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
......@@ -76,7 +76,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
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
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
......
......@@ -3,15 +3,23 @@ local s,id,o=GetID()
function s.initial_effect(c)
c:EnableReviveLimit()
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
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,id)
e1:SetCondition(s.descon)
e1:SetTarget(s.destg)
e1:SetOperation(s.desop)
e1:SetLabelObject(e0)
c:RegisterEffect(e1)
--actlimit
local e2=Effect.CreateEffect(c)
......@@ -27,22 +35,32 @@ end
function s.matfilter1(c)
return c:IsFusionType(TYPE_LINK) and c:IsFusionSetCard(0xfc)
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)
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION)
end
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() end
local sg=e:GetHandler():GetMaterial()
local ct=sg:Filter(Card.IsSetCard,nil,0xfc):GetSum(Card.GetLink)
local ct,lim=e:GetLabelObject():GetLabel()
if chk==0 then return ct>0
and Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
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)
if sg:IsExists(s.limfilter,1,nil) then
if lim>0 then
g:KeepAlive()
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:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(RESET_CHAIN)
......@@ -53,9 +71,6 @@ function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.RegisterEffect(e1,tp)
end
end
function s.limfilter(c)
return c:IsLinkAbove(3)
end
function s.limit(g)
return function (e,lp,tp)
return not g:IsContains(e:GetHandler())
......
......@@ -47,7 +47,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp)
end
end
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())
end
function s.thfilter2(c,atk)
......@@ -56,15 +56,14 @@ function s.thfilter2(c,atk)
end
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 chk==0 then return Duel.IsPlayerCanDraw(tp,1)
and Duel.IsExistingTarget(s.tgfilter,tp,LOCATION_MZONE,0,1,nil,tp) end
if chk==0 then return Duel.IsExistingTarget(s.tgfilter,tp,LOCATION_MZONE,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,s.tgfilter,tp,LOCATION_MZONE,0,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end
function s.thop2(e,tp,eg,ep,ev,re,r,rp)
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)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter2),tp,LOCATION_GRAVE,0,1,1,nil,tc:GetAttack())
if g:GetCount()>0 then
......@@ -76,9 +75,10 @@ function s.thop2(e,tp,eg,ep,ev,re,r,rp)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(0,LOCATION_MZONE)
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)
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
function s.atlimit(e,c)
......
--
--剛鬼シーク・オーガ
local s,id,o=GetID()
function s.initial_effect(c)
--link summon
......@@ -7,7 +7,7 @@ function s.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
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:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_TO_HAND)
......@@ -29,9 +29,8 @@ function s.initial_effect(c)
c:RegisterEffect(e2)
end
function s.trigfilter(c,tp)
return c:IsSetCard(0xfc) and c:IsControler(tp) and c:IsType(TYPE_MONSTER) and not c:IsReason(REASON_DRAW)
and not (c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEDOWN) and not c:IsPublic())
and (not c:IsStatus(STATUS_TO_HAND_WITHOUT_CONFIRM) or (c:IsStatus(STATUS_TO_HAND_WITHOUT_CONFIRM) and c:IsPublic()))
return c:IsSetCard(0xfc) and c:IsControler(tp) and c:IsPreviousLocation(LOCATION_DECK) and not c:IsReason(REASON_DRAW)
and c:IsType(TYPE_MONSTER) and not c:IsStatus(STATUS_TO_HAND_WITHOUT_CONFIRM)
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(s.trigfilter,1,nil,tp)
......@@ -42,6 +41,7 @@ end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
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
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
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:SetAbsoluteRange(tp,1,0)
e1:SetTarget(s.splimit)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_CONTROL)
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
......@@ -93,6 +93,7 @@ function s.fsptg(e,tp,eg,ep,ev,re,r,rp,chk)
end
return res
end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function s.fspop(e,tp,eg,ep,ev,re,r,rp)
......
--
--剛鬼闘魂
local s,id,o=GetID()
function s.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
......@@ -29,7 +30,7 @@ end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local cg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_HAND,0,nil,e,tp)
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)
local sg=cg:Select(tp,1,1,nil)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
......@@ -47,7 +48,6 @@ end
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
local g=Duel.SelectReleaseGroup(tp,s.costfilter,1,1,nil,e,tp)
e:SetLabel(g:GetFirst():GetOriginalLevel())
Duel.Release(g,REASON_COST)
end
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