Commit 84029cd5 authored by Huangnan's avatar Huangnan

fix

parent ce505aed
Pipeline #24126 passed with stages
in 43 minutes and 18 seconds
--45钢
function c24400049.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_CONTINUOUS_TARGET)
e1:SetTarget(c24400049.target)
e1:SetOperation(c24400049.operation)
c:RegisterEffect(e1)
--cannot be destroyed
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_INDESTRUCTABLE_COUNT)
e2:SetValue(c24400049.valcon)
e2:SetCountLimit(1)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_SZONE)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_BATTLE_START)
e3:SetCountLimit(1,24400049)
e3:SetCost(aux.bfgcost)
e3:SetTarget(c24400049.kktg)
e3:SetOperation(c24400049.kkop)
c:RegisterEffect(e3)
--Equip limit
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_EQUIP_LIMIT)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e4:SetValue(c24400049.eqlimit)
c:RegisterEffect(e4)
end
c24400049.named_with_ZhanShuRenXing=true
function c24400049.eqlimit(e,c)
return (c.named_with_TeZhanRenXing or c.named_with_ZhanShuRenXing)
end
function c24400049.filter(c)
return c:IsFaceup() and (c.named_with_TeZhanRenXing or c.named_with_ZhanShuRenXing)
end
function c24400049.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:GetLocation()==LOCATION_MZONE and c24400049.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c24400049.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c24400049.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function c24400049.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,e:GetHandler(),tc)
end
end
function c24400049.valcon(e,re,r,rp)
return bit.band(r,REASON_BATTLE+REASON_EFFECT)~=0
end
function c24400049.kktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_MZONE,0,1,nil,24400042,24400032,24400026,24400089) end
end
function c24400049.kkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c24400049.filter,tp,LOCATION_MZONE,0,1,nil)
if g:GetCount()>0 then
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetValue(c24400049.tgoval)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e2:SetOwnerPlayer(tp)
tc:RegisterEffect(e2)
tc=g:GetNext()
end
end
end
function c24400049.tgoval(e,re,rp)
return rp==1-e:GetOwnerPlayer()
end
--忤逆小队
function c24400091.initial_effect(c)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--indes
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_INDESTRUCTABLE_COUNT)
e1:SetRange(LOCATION_SZONE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(c24400091.target)
e1:SetValue(c24400091.indct)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(0,LOCATION_MZONE)
e2:SetValue(c24400091.atkval)
c:RegisterEffect(e2)
--negate
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(24400091,1))
e2:SetCategory(CATEGORY_NEGATE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,24400091)
e2:SetCondition(c24400091.discon)
e2:SetCost(c24400091.discost)
e2:SetTarget(c24400091.distg)
e2:SetOperation(c24400091.disop)
c:RegisterEffect(e2)
--counter
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(24400091,1))
e3:SetCategory(CATEGORY_COUNTER)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,33100091)
e3:SetCondition(c24400091.ctcon)
e3:SetTarget(c24400091.cttg)
e3:SetOperation(c24400091.ctop)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EVENT_SUMMON_SUCCESS)
c:RegisterEffect(e4)
end
c24400091.named_with_WuNiTeam=true
c24400091.named_with_ZhanShuRenXing=true
function c24400091.indct(e,re,r,rp)
if bit.band(r,REASON_BATTLE+REASON_EFFECT)~=0 then
return 1
else return 0 end
end
function c24400091.atkval(e)
local tp=e:GetHandlerPlayer()
return Duel.GetCounter(tp,LOCATION_SZONE,LOCATION_SZONE,0x1f65)*-400
end
function c24400091.discon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and Duel.IsChainNegatable(ev)
end
function c24400091.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsCanRemoveCounter(tp,1,1,0x1f65,3,REASON_COST) end
Duel.RemoveCounter(tp,1,1,0x1f65,3,REASON_COST)
end
function c24400091.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return aux.nbcon(tp,re) end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_REMOVE,eg,1,0,0)
end
end
function c24400091.disop(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Remove(eg,POS_FACEUP,REASON_EFFECT)
end
end
function c24400091.cfilter2(c,tp)
return c:IsSummonPlayer(tp) and (c.named_with_TeZhanRenXing or c.named_with_ZhanShuRenXing) and c:IsFaceup()
end
function c24400091.ctcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c24400091.cfilter2,1,nil,tp)
end
function c24400091.cttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanAddCounter(0x1f65,2) end
end
function c24400091.ctop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
c:AddCounter(0x1f65,2)
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