Commit 6b807e3e authored by salix5's avatar salix5 Committed by GitHub

workaround for triple tribute (#1457)

parent d0c177a6
......@@ -8,7 +8,7 @@ function c25524823.initial_effect(c)
e1:SetCode(EFFECT_SUMMON_PROC)
e1:SetCondition(c25524823.ttcon)
e1:SetOperation(c25524823.ttop)
e1:SetValue(SUMMON_TYPE_ADVANCE)
e1:SetValue(SUMMON_TYPE_ADVANCE+SUMMON_VALUE_SELF)
c:RegisterEffect(e1)
--summon with 1 tribute
local e2=Effect.CreateEffect(c)
......
......@@ -20,7 +20,7 @@ function c42166000.initial_effect(c)
e2:SetCondition(c42166000.hspcon)
e2:SetOperation(c42166000.hspop)
c:RegisterEffect(e2)
--triple tribute
--triple tribute(require 3 tributes, summon)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(42166000,0))
e3:SetType(EFFECT_TYPE_FIELD)
......@@ -28,38 +28,48 @@ function c42166000.initial_effect(c)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(LOCATION_HAND,0)
e3:SetCondition(c42166000.ttcon)
e3:SetTarget(c42166000.tttg)
e3:SetTarget(c42166000.tttg1)
e3:SetOperation(c42166000.ttop)
e3:SetValue(SUMMON_TYPE_ADVANCE)
c:RegisterEffect(e3)
--triple tribute(require 3 tributes, set)
local e4=e3:Clone()
e4:SetCode(EFFECT_LIMIT_SET_PROC)
e4:SetTarget(c42166000.tttg2)
c:RegisterEffect(e4)
--battle indestructable
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e5:SetValue(1)
--triple tribute(can tribute 3 monsters, summon)
local e5=e3:Clone()
e5:SetCode(EFFECT_SUMMON_PROC)
e5:SetTarget(c42166000.tttg3)
e5:SetValue(SUMMON_TYPE_ADVANCE+SUMMON_VALUE_SELF)
c:RegisterEffect(e5)
--cannot be target
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_FIELD)
e6:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e6:SetRange(LOCATION_MZONE)
e6:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_SET_AVAILABLE)
e6:SetTargetRange(LOCATION_MZONE,0)
e6:SetTarget(c42166000.tgtg)
e6:SetValue(aux.tgoval)
c:RegisterEffect(e6)
--atk limit
--triple tribute(can tribute 3 monsters, set)
--(reserved)
--battle indestructable
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_FIELD)
e7:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET)
e7:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e7:SetRange(LOCATION_MZONE)
e7:SetTargetRange(0,LOCATION_MZONE)
e7:SetValue(c42166000.tgtg)
e7:SetType(EFFECT_TYPE_SINGLE)
e7:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e7:SetValue(1)
c:RegisterEffect(e7)
--cannot be target
local e8=Effect.CreateEffect(c)
e8:SetType(EFFECT_TYPE_FIELD)
e8:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e8:SetRange(LOCATION_MZONE)
e8:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_SET_AVAILABLE)
e8:SetTargetRange(LOCATION_MZONE,0)
e8:SetTarget(c42166000.tgtg)
e8:SetValue(aux.tgoval)
c:RegisterEffect(e8)
--atk limit
local e9=Effect.CreateEffect(c)
e9:SetType(EFFECT_TYPE_FIELD)
e9:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET)
e9:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e9:SetRange(LOCATION_MZONE)
e9:SetTargetRange(0,LOCATION_MZONE)
e9:SetValue(c42166000.tgtg)
c:RegisterEffect(e9)
end
function c42166000.ffilter(c)
return c:IsFusionAttribute(ATTRIBUTE_WATER) and c:IsLevel(10)
......@@ -81,15 +91,21 @@ function c42166000.hspop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Release(g,REASON_COST)
end
function c42166000.ttfilter(c,tp)
return c:GetOriginalCode()==42166000 and c:IsReleasable() and Duel.GetMZoneCount(tp,c)>0
return c:IsCode(42166000) and c:IsReleasable() and Duel.GetMZoneCount(tp,c)>0
end
function c42166000.ttcon(e,c,minc)
if c==nil then return true end
local tp=c:GetControler()
return minc<=3 and Duel.IsExistingMatchingCard(c42166000.ttfilter,tp,LOCATION_MZONE,0,1,nil,tp)
end
function c42166000.tttg(e,c)
return c:IsCode(10000000,10000010,10000020,10000080,3912064,21208154,25524823,33022867,36354007,57793869,57761191,62180201,78651105)
function c42166000.tttg1(e,c)
return c:IsCode(10000000,10000010,10000020,10000080,21208154,57793869,57761191,62180201)
end
function c42166000.tttg2(e,c)
return c:IsCode(21208154,57793869,62180201)
end
function c42166000.tttg3(e,c)
return c:IsCode(3912064,25524823,36354007,75285069,78651105)
end
function c42166000.ttop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
......
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