Commit 027798fa authored by wind2009's avatar wind2009

20.9

parent a43c429f
Pipeline #42153 passed with stages
in 3 minutes and 1 second
......@@ -91,7 +91,7 @@ add_script_diff:
FIELDS: 'name,desc,overallString,picUrl'
GIT_DEPTH: '1000'
OUTPUT_FILENAME: test-release.json
REF_COMMIT: '20.7' # 更新的时候改这里,修改成上一个tag的版本号
REF_COMMIT: '20.8' # 更新的时候改这里,修改成上一个tag的版本号
script:
- apt update;apt -y install wget
- currentPath=$PWD
......
......@@ -56,18 +56,20 @@ end
function s.ffilter(c,fc,sub,mg,sg)
return c:IsRace(RACE_ILLUSION+RACE_SPELLCASTER+RACE_FIEND) and (not sg or not sg:IsExists(Card.IsRace,1,c,c:GetRace()))
end
function s.eqfilter(c,tp)
return c:IsAbleToChangeControler() and (c:IsFacedown() or not c:IsForbidden() and c:CheckUniqueOnField(tp))
end
function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToChangeControler,tp,0,LOCATION_MZONE,1,nil)
if chk==0 then return Duel.IsExistingMatchingCard(s.eqfilter,tp,0,LOCATION_MZONE,1,nil,tp)
and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,1-tp,LOCATION_MZONE)
end
function s.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToChain() and c:IsFaceup() and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToChangeControler,tp,0,LOCATION_MZONE,1,1,nil)
local g=Duel.SelectMatchingCard(tp,s.eqfilter,tp,0,LOCATION_MZONE,1,1,nil,tp)
if g:GetCount()>0 then
Duel.HintSelection(g)
local sc=g:GetFirst()
......
......@@ -35,12 +35,12 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.Destroy(dg,REASON_EFFECT)~=0 then
local sg=Duel.GetOperatedGroup()
local dam=sg:GetSum(Card.GetBaseAttack)
if Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil,REASON_EFFECT)
if Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil,REASON_EFFECT+REASON_DISCARD)
and dam>0
and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local hg=Duel.GetMatchingGroup(Card.IsDiscardable,tp,LOCATION_HAND,0,nil,REASON_EFFECT)
local hg=Duel.GetMatchingGroup(Card.IsDiscardable,tp,LOCATION_HAND,0,nil,REASON_EFFECT+REASON_DISCARD)
Duel.SendtoGrave(hg,REASON_EFFECT+REASON_DISCARD)
Duel.Damage(1-tp,dam,REASON_EFFECT)
end
......
......@@ -58,6 +58,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
local race,att=e:GetLabel()
local ec=Duel.GetFirstTarget()
if ec:IsRelateToChain() and ec:IsFaceup() and ec:IsType(TYPE_MONSTER) then
local cres=ec:GetRace()~=race or ec:GetAttribute()~=att
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_RACE)
......@@ -71,7 +72,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
ec:RegisterEffect(e2)
Duel.AdjustAll()
if ec:IsControler(1-tp) then return false end
if ec:IsControler(1-tp) or not cres then return false end
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(s.filter1,nil,e)
local res=Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,ec,nil,chkf)
......@@ -121,13 +122,12 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
end
function s.cfilter(c,tp,chk)
return c:IsType(TYPE_FUSION) and c:IsReleasableByEffect() and (not chk
or (Duel.GetMZoneCount(tp,c)>1
or (Duel.GetMZoneCount(tp,c)>1 and not Duel.IsPlayerAffectedByEffect(tp,59822133)
and Duel.IsPlayerCanSpecialSummonMonster(tp,id+o,0,TYPES_TOKEN_MONSTER,0,0,c:GetLevel(),RACE_SPELLCASTER,ATTRIBUTE_DARK)))
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local rg=Duel.GetReleaseGroup(tp,false,REASON_EFFECT)
if chk==0 then return rg:IsExists(s.cfilter,1,nil,tp,true)
and not Duel.IsPlayerAffectedByEffect(tp,59822133) end
if chk==0 then return rg:IsExists(s.cfilter,1,nil,tp,true) end
Duel.SetOperationInfo(0,CATEGORY_RELEASE,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,0,0)
......
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