Commit fc323e65 authored by POLYMER's avatar POLYMER

fix

parent 83b7e0af
--投身革命的战士
local m=11451445
local cm=_G["c"..m]
local cm,m=GetID()
function cm.initial_effect(c)
aux.AddCodeList(c,99518961)
--spsummon procedure
......@@ -48,7 +47,16 @@ function cm.effectfilter(e,ct)
return aux.IsCodeListed(te:GetHandler(),99518961)
end
function cm.filter(c,e,tp)
return c:IsLevelBelow(3) and c:IsType(TYPE_NORMAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
if not (c:IsLevelBelow(3) and c:IsType(TYPE_NORMAL)) then return false end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_RACE)
e1:SetValue(RACE_WARRIOR)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD)
c:RegisterEffect(e1)
local res=c:IsCanBeSpecialSummoned(e,0,tp,false,false)
e1:Reset()
return res
end
function cm.spcon(e,c)
if c==nil then return true end
......@@ -64,13 +72,12 @@ end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)>0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_RACE)
e1:SetValue(RACE_WARRIOR)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_RACE)
e1:SetValue(RACE_WARRIOR)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD)
tc:RegisterEffect(e1)
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
......@@ -90,29 +90,47 @@ function cm.adcon2(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.filter,1,nil,tp)
end
function cm.adtg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 and (Duel.GetFieldGroupCount(1-tp,LOCATION_HAND,0)>0 or Duel.IsExistingMatchingCard(cm.spfilter2,tp,0,LOCATION_GRAVE,1,nil,e,1-tp)) and Duel.IsPlayerCanSpecialSummon(1-tp) end
local att=ATTRIBUTE_ALL
if Duel.GetFieldGroupCount(1-tp,LOCATION_HAND,0)==0 then
att=0
for i=1,7 do
if Duel.IsExistingMatchingCard(cm.spfilter2,tp,0,LOCATION_GRAVE,1,nil,e,1-tp,1<<i) then att=att|(1<<i) end
end
end
if chk==0 then return Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 and att>0 and Duel.IsPlayerCanSpecialSummon(1-tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATTRIBUTE)
local aat=Duel.AnnounceAttribute(tp,1,ATTRIBUTE_ALL)
local aat=Duel.AnnounceAttribute(tp,1,att)
e:SetLabel(aat)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,1-tp,LOCATION_HAND)
end
function cm.spfilter2(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
function cm.spfilter2(c,e,tp,att)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_ATTRIBUTE)
e1:SetValue(att)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD)
c:RegisterEffect(e1)
--Duel.AdjustAll()
local res=c:IsCanBeSpecialSummoned(e,0,tp,false,false)
e1:Reset()
return res
end
function cm.adop2(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local att=e:GetLabel()
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_SPSUMMON)
local g=Duel.GetMatchingGroup(cm.spfilter2,tp,0,LOCATION_HAND,nil,e,1-tp)
if #g==0 then g=Duel.GetMatchingGroup(cm.spfilter2,tp,0,LOCATION_GRAVE,nil,e,1-tp) end
local g=Duel.GetMatchingGroup(cm.spfilter2,tp,0,LOCATION_HAND,nil,e,1-tp,att)
if #g==0 then g=Duel.GetMatchingGroup(aux.NecroValleyFilter(cm.spfilter2),tp,0,LOCATION_GRAVE,nil,e,1-tp,att) end
local sg=g:Select(1-tp,1,1,nil)
if #sg>0 and Duel.SpecialSummon(sg,0,1-tp,1-tp,false,false,POS_FACEUP)>0 then
if #sg>0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_ATTRIBUTE)
e1:SetValue(att)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD)
sg:GetFirst():RegisterEffect(e1)
--Duel.AdjustAll()
Duel.SpecialSummon(sg,0,1-tp,1-tp,false,false,POS_FACEUP)
end
end
function cm.filter2(c,re,tp,r)
......
......@@ -21,7 +21,6 @@ function cm.initial_effect(c)
e0:SetDescription(1165)
e0:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e0:SetCode(EVENT_PHASE+PHASE_BATTLE)
e0:SetCountLimit(1)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetRange(LOCATION_GRAVE)
e0:SetCondition(cm.xyzcon)
......@@ -162,9 +161,10 @@ function cm.xyzop2(e,tp,chk)
if chk==0 then return true end
end
function cm.xyzcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSpecialSummonable(SUMMON_TYPE_XYZ)
return e:GetHandler():IsSpecialSummonable(SUMMON_TYPE_XYZ) and e:GetHandler():GetFlagEffect(m)==0
end
function cm.xyzop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE,0,1)
if Duel.SelectYesNo(tp,aux.Stringid(m,2)) then
Duel.SpecialSummonRule(tp,e:GetHandler(),SUMMON_TYPE_XYZ)
end
......
......@@ -56,18 +56,22 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil,tp):GetFirst()
if tc and Duel.SendtoHand(tc,nil,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_HAND) then
Duel.ConfirmCards(1-tp,tc)
Duel.SetChainLimitTillChainEnd(aux.FALSE)
local e4=Effect.CreateEffect(e:GetHandler())
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_CHAIN_END)
e4:SetOperation(s.limop)
Duel.RegisterEffect(e4,tp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(1,1)
e1:SetValue(aux.TRUE)
e1:SetReset(RESET_CHAIN)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_END)
e2:SetOperation(s.limop)
Duel.RegisterEffect(e2,tp)
end
end
function s.resetop(e,tp,eg,ep,ev,re,r,rp)
Duel.ResetFlagEffect(tp,id)
e:Reset()
end
function s.limop(e,tp,eg,ep,ev,re,r,rp)
Duel.SetChainLimitTillChainEnd(aux.FALSE)
Duel.SetChainLimitTillChainEnd(aux.FALSE)
e:Reset()
end
......@@ -62,7 +62,7 @@ function s.adjustop(e,tp,eg,ep,ev,re,r,rp)
if not s.globle_check[tp] then
s.globle_check[tp]=true
--setcard mentioned
local g=Duel.GetMatchingGroup(aux.NOT(Card.IsCode),0,0xff,0,nil,id)
local g=Duel.GetMatchingGroup(aux.NOT(Card.IsCode),tp,0xff,0,nil,id)
cregister=Card.RegisterEffect
csetcard=Card.IsSetCard
disexistingtarget=Duel.IsExistingTarget
......@@ -261,110 +261,110 @@ function s.retop(e,tp,eg,ep,ev,re,r,rp)
end
function s.change_card_function(table)
local i=1
Card.IsAbleToChangeControler=table[i] i=i+1
Card.IsAbleToDeck=table[i] i=i+1
Card.IsAbleToChangeControler=table[i] i=i+1
Card.IsAbleToDeck=table[i] i=i+1
Card.IsAbleToDeckAsCost=table[i] i=i+1
Card.IsAbleToDeckOrExtraAsCost=table[i] i=i+1
Card.IsAbleToDecreaseAttackAsCost=table[i] i=i+1
Card.IsAbleToDecreaseDefenseAsCost=table[i] i=i+1
Card.IsAbleToExtra=table[i] i=i+1
Card.IsAbleToExtraAsCost=table[i] i=i+1
Card.IsAbleToGrave=table[i] i=i+1
Card.IsAbleToGraveAsCost=table[i] i=i+1
Card.IsAbleToHand=table[i] i=i+1
Card.IsAbleToDeckOrExtraAsCost=table[i] i=i+1
Card.IsAbleToDecreaseAttackAsCost=table[i] i=i+1
Card.IsAbleToDecreaseDefenseAsCost=table[i] i=i+1
Card.IsAbleToExtra=table[i] i=i+1
Card.IsAbleToExtraAsCost=table[i] i=i+1
Card.IsAbleToGrave=table[i] i=i+1
Card.IsAbleToGraveAsCost=table[i] i=i+1
Card.IsAbleToHand=table[i] i=i+1
Card.IsAbleToHandAsCost=table[i] i=i+1
Card.IsAbleToRemove=table[i] i=i+1
Card.IsAbleToRemoveAsCost=table[i] i=i+1
Card.IsAllColumn=table[i] i=i+1
Card.IsAttack=table[i] i=i+1
Card.IsAttackable=table[i] i=i+1
Card.IsAttackAbove=table[i] i=i+1
Card.IsAttackAbove=table[i] i=i+1
Card.IsAttackBelow=table[i] i=i+1
Card.IsAttackPos=table[i] i=i+1
Card.IsAttribute=table[i] i=i+1
Card.IsCanAddCounter=table[i] i=i+1
Card.IsCanBeBattleTarget=table[i] i=i+1
Card.IsCanBeEffectTarget=table[i] i=i+1
Card.IsCanBeFusionMaterial=table[i] i=i+1
Card.IsCanBeLinkMaterial=table[i] i=i+1
Card.IsCanBeRitualMaterial=table[i] i=i+1
Card.IsAbleToRemoveAsCost=table[i] i=i+1
Card.IsAllColumn=table[i] i=i+1
Card.IsAttack=table[i] i=i+1
Card.IsAttackable=table[i] i=i+1
Card.IsAttackAbove=table[i] i=i+1
Card.IsAttackAbove=table[i] i=i+1
Card.IsAttackBelow=table[i] i=i+1
Card.IsAttackPos=table[i] i=i+1
Card.IsAttribute=table[i] i=i+1
Card.IsCanAddCounter=table[i] i=i+1
Card.IsCanBeBattleTarget=table[i] i=i+1
Card.IsCanBeEffectTarget=table[i] i=i+1
Card.IsCanBeFusionMaterial=table[i] i=i+1
Card.IsCanBeLinkMaterial=table[i] i=i+1
Card.IsCanBeRitualMaterial=table[i] i=i+1
Card.IsCanBeSpecialSummoned=table[i] i=i+1
Card.IsCanBeSynchroMaterial=table[i] i=i+1
Card.IsCanBeXyzMaterial=table[i] i=i+1
Card.IsCanChangePosition=table[i] i=i+1
Card.IsCanChangePosition=table[i] i=i+1
Card.IsCanRemoveCounter=table[i] i=i+1
Card.IsCanTurnSet=table[i] i=i+1
Card.IsChainAttackable=table[i] i=i+1
Card.IsCanTurnSet=table[i] i=i+1
Card.IsChainAttackable=table[i] i=i+1
Card.IsCode=table[i] i=i+1
Card.IsControler=table[i] i=i+1
Card.IsControlerCanBeChanged=table[i] i=i+1
Card.IsDefense=table[i] i=i+1
Card.IsControler=table[i] i=i+1
Card.IsControlerCanBeChanged=table[i] i=i+1
Card.IsDefense=table[i] i=i+1
Card.IsDefenseAbove=table[i] i=i+1
Card.IsDefenseBelow=table[i] i=i+1
Card.IsDefensePos=table[i] i=i+1
Card.IsDefensePos=table[i] i=i+1
Card.IsDestructable=table[i] i=i+1
Card.IsDirectAttacked=table[i] i=i+1
Card.IsDirectAttacked=table[i] i=i+1
Card.IsDisabled=table[i] i=i+1
Card.IsDiscardable=table[i] i=i+1
Card.IsDualState=table[i] i=i+1
Card.IsExtraLinkState=table[i] i=i+1
Card.IsDiscardable=table[i] i=i+1
Card.IsDualState=table[i] i=i+1
Card.IsExtraLinkState=table[i] i=i+1
Card.IsFacedown=table[i] i=i+1
Card.IsFaceup=table[i] i=i+1
Card.IsForbidden=table[i] i=i+1
Card.IsFusionAttribute=table[i] i=i+1
Card.IsFusionCode=table[i] i=i+1
Card.IsFusionSetCard=table[i] i=i+1
Card.IsFaceup=table[i] i=i+1
Card.IsForbidden=table[i] i=i+1
Card.IsFusionAttribute=table[i] i=i+1
Card.IsFusionCode=table[i] i=i+1
Card.IsFusionSetCard=table[i] i=i+1
Card.IsFusionSummonableCard=table[i] i=i+1
Card.IsFusionType=table[i] i=i+1
Card.IsHasCardTarget=table[i] i=i+1
Card.IsImmuneToEffect=table[i] i=i+1
Card.IsLevel=table[i] i=i+1
Card.IsLevelAbove=table[i] i=i+1
Card.IsLevelBelow=table[i] i=i+1
Card.IsFusionType=table[i] i=i+1
Card.IsHasCardTarget=table[i] i=i+1
Card.IsImmuneToEffect=table[i] i=i+1
Card.IsLevel=table[i] i=i+1
Card.IsLevelAbove=table[i] i=i+1
Card.IsLevelBelow=table[i] i=i+1
Card.IsLink=table[i] i=i+1
Card.IsLinkAbove=table[i] i=i+1
Card.IsLinkAttribute=table[i] i=i+1
Card.IsLinkBelow=table[i] i=i+1
Card.IsLinkAbove=table[i] i=i+1
Card.IsLinkAttribute=table[i] i=i+1
Card.IsLinkBelow=table[i] i=i+1
Card.IsLinkCode=table[i] i=i+1
Card.IsLinkMarker=table[i] i=i+1
Card.IsLinkMarker=table[i] i=i+1
Card.IsLinkRace=table[i] i=i+1
Card.IsLinkSetCard=table[i] i=i+1
Card.IsLinkState=table[i] i=i+1
Card.IsLinkSetCard=table[i] i=i+1
Card.IsLinkState=table[i] i=i+1
Card.IsLinkType=table[i] i=i+1
Card.IsLocation=table[i] i=i+1
Card.IsMSetable=table[i] i=i+1
Card.IsNotTuner=table[i] i=i+1
Card.IsOnField=table[i] i=i+1
Card.IsOnField=table[i] i=i+1
Card.IsPosition=table[i] i=i+1
Card.IsPreviousLocation=table[i] i=i+1
Card.IsPreviousPosition=table[i] i=i+1
Card.IsPreviousSetCard=table[i] i=i+1
Card.IsPublic=table[i] i=i+1
Card.IsPreviousSetCard=table[i] i=i+1
Card.IsPublic=table[i] i=i+1
Card.IsRace=table[i] i=i+1
Card.IsRank=table[i] i=i+1
Card.IsRankAbove=table[i] i=i+1
Card.IsRankBelow=table[i] i=i+1
Card.IsReason=table[i] i=i+1
Card.IsRelateToBattle=table[i] i=i+1
Card.IsRankAbove=table[i] i=i+1
Card.IsRankBelow=table[i] i=i+1
Card.IsReason=table[i] i=i+1
Card.IsRelateToBattle=table[i] i=i+1
Card.IsRelateToCard=table[i] i=i+1
Card.IsRelateToChain=table[i] i=i+1
Card.IsRelateToEffect=table[i] i=i+1
Card.IsReleasable=table[i] i=i+1
Card.IsReleasableByEffect=table[i] i=i+1
Card.IsRitualType=table[i] i=i+1
Card.IsSetCard=table[i] i=i+1
Card.IsSpecialSummonable=table[i] i=i+1
Card.IsRelateToChain=table[i] i=i+1
Card.IsRelateToEffect=table[i] i=i+1
Card.IsReleasable=table[i] i=i+1
Card.IsReleasableByEffect=table[i] i=i+1
Card.IsRitualType=table[i] i=i+1
Card.IsSetCard=table[i] i=i+1
Card.IsSpecialSummonable=table[i] i=i+1
Card.IsSSetable=table[i] i=i+1
Card.IsStatus=table[i] i=i+1
Card.IsSummonable=table[i] i=i+1
Card.IsSummonableCard=table[i] i=i+1
Card.IsSummonType=table[i] i=i+1
Card.IsSynchroSummonable=table[i] i=i+1
Card.IsSynchroType=table[i] i=i+1
Card.IsStatus=table[i] i=i+1
Card.IsSummonable=table[i] i=i+1
Card.IsSummonableCard=table[i] i=i+1
Card.IsSummonType=table[i] i=i+1
Card.IsSynchroSummonable=table[i] i=i+1
Card.IsSynchroType=table[i] i=i+1
Card.IsType=table[i] i=i+1
Card.IsXyzLevel=table[i] i=i+1
Card.IsXyzSummonable=table[i] i=i+1
Card.IsXyzSummonableByRose=table[i] i=i+1
Card.IsXyzType=table[i] i=i+1
Card.IsXyzSummonable=table[i] i=i+1
Card.IsXyzSummonableByRose=table[i] i=i+1
Card.IsXyzType=table[i] i=i+1
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