Commit 6f408f59 authored by wind2009's avatar wind2009

Fix 六武式真伝天魔六段衝

parent bdde50e9
...@@ -53,7 +53,7 @@ merge_databases: ...@@ -53,7 +53,7 @@ merge_databases:
FIELDS: 'name,desc,overallString,picUrl' FIELDS: 'name,desc,overallString,picUrl'
GIT_DEPTH: '1000' GIT_DEPTH: '1000'
OUTPUT_FILENAME: test-release.json OUTPUT_FILENAME: test-release.json
REF_COMMIT: '8.12' # 更新的时候改这里,修改成上一个tag的版本号 REF_COMMIT: '8.13' # 更新的时候改这里,修改成上一个tag的版本号
script: script:
- apt update;apt -y install wget - apt update;apt -y install wget
- currentPath=$PWD - currentPath=$PWD
......
...@@ -3,6 +3,7 @@ local s,id,o=GetID() ...@@ -3,6 +3,7 @@ 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,1))
e1:SetCategory(CATEGORY_DESTROY) e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
...@@ -28,15 +29,11 @@ function s.initial_effect(c) ...@@ -28,15 +29,11 @@ function s.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function s.cfilter(c) function s.cfilter(c)
return c:IsSetCard(0x3d) and c:IsType(TYPE_SYNCHRO) and c:IsFaceup() return c:IsSetCard(0x103d) and c:IsType(TYPE_SYNCHRO) and c:IsFaceup()
end end
function s.condition(e,tp,eg,ep,ev,re,r,rp) function s.condition(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetCounter(tp,1,0,0x3) local ct=Duel.GetCounter(tp,1,0,0x3)
local rt=3 local rt=3-math.floor(ct/6)
while ct>5 and rt>0 do
rt=rt-1
ct=ct-6
end
if rt==0 then return true end if rt==0 then return true end
local g=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_MZONE,0,nil) local g=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_MZONE,0,nil)
return g:GetCount()>0 and g:GetClassCount(Card.GetCode)<=rt return g:GetCount()>0 and g:GetClassCount(Card.GetCode)<=rt
...@@ -53,10 +50,10 @@ end ...@@ -53,10 +50,10 @@ end
function s.spcon(e,tp,eg,ep,ev,re,r,rp) function s.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c:IsReason(REASON_EFFECT) and rp==1-tp and c:IsPreviousControler(tp) return c:IsReason(REASON_EFFECT) and rp==1-tp and c:IsPreviousControler(tp)
and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEDOWN) and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEDOWN) and re and re:IsActivated()
end end
function s.spfilter(c,e,tp) function s.spfilter(c,e,tp)
return (c:IsSetCard(0x3d) or c:IsSetCard(0x20) and c:IsType(TYPE_EFFECT)) return (c:IsSetCard(0x103d) or c:IsSetCard(0x20) and c:IsType(TYPE_EFFECT))
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and (c:IsLocation(LOCATION_DECK) and Duel.GetMZoneCount(tp)>0 and (c:IsLocation(LOCATION_DECK) and Duel.GetMZoneCount(tp)>0
or c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0) or c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0)
...@@ -71,4 +68,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -71,4 +68,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end end
end end
\ No newline at end of file
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