Commit 762a0755 authored by Chrono-Genex's avatar Chrono-Genex Committed by GitHub

use ATTRIBUTE_ALL (#1573)

parent 1bc6434c
......@@ -30,7 +30,7 @@ function c10352095.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATTRIBUTE)
local rc=Duel.AnnounceAttribute(tp,1,0xff-g:GetFirst():GetAttribute())
local rc=Duel.AnnounceAttribute(tp,1,ATTRIBUTE_ALL-g:GetFirst():GetAttribute())
e:GetLabelObject():SetLabel(rc)
e:GetHandler():SetHint(CHINT_ATTRIBUTE,rc)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
......
......@@ -67,7 +67,7 @@ end
function c18214905.atttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATTRIBUTE)
local att=Duel.AnnounceAttribute(tp,1,0xff-e:GetHandler():GetAttribute())
local att=Duel.AnnounceAttribute(tp,1,ATTRIBUTE_ALL-e:GetHandler():GetAttribute())
e:SetLabel(att)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,tp,LOCATION_GRAVE)
end
......
......@@ -65,7 +65,7 @@ end
function c19036557.atttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATTRIBUTE)
local att=Duel.AnnounceAttribute(tp,1,0xff-e:GetHandler():GetAttribute())
local att=Duel.AnnounceAttribute(tp,1,ATTRIBUTE_ALL-e:GetHandler():GetAttribute())
e:SetLabel(att)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,tp,LOCATION_GRAVE)
end
......
......@@ -17,7 +17,7 @@ function c20127343.costg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATTRIBUTE)
local att=Duel.AnnounceAttribute(tp,1,0xff-g:GetFirst():GetAttribute())
local att=Duel.AnnounceAttribute(tp,1,ATTRIBUTE_ALL-g:GetFirst():GetAttribute())
e:SetLabel(att)
end
function c20127343.cosop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -37,7 +37,7 @@ function c20426176.atrtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATTRIBUTE)
local att=Duel.AnnounceAttribute(tp,1,0xff-g:GetFirst():GetAttribute())
local att=Duel.AnnounceAttribute(tp,1,ATTRIBUTE_ALL-g:GetFirst():GetAttribute())
e:SetLabel(att)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,0,tp,LOCATION_GRAVE)
end
......
......@@ -61,13 +61,13 @@ function c25704359.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return false end
local g=eg:Filter(c25704359.cfilter,nil,tp)
local att=0x7f
local att=ATTRIBUTE_ALL
local tc=g:GetFirst()
while tc do
att=bit.band(att,tc:GetOriginalAttribute())
tc=g:GetNext()
end
att=0x7f-att
att=ATTRIBUTE_ALL-att
e:SetLabel(att)
return Duel.IsExistingMatchingCard(c25704359.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp,att)
end
......
......@@ -74,7 +74,7 @@ end
function c27769400.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATTRIBUTE)
local rc=Duel.AnnounceAttribute(tp,1,0xff)
local rc=Duel.AnnounceAttribute(tp,1,ATTRIBUTE_ALL)
Duel.SetTargetParam(rc)
e:GetHandler():SetHint(CHINT_ATTRIBUTE,rc)
local g=Duel.GetMatchingGroup(c27769400.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,rc)
......
......@@ -19,7 +19,7 @@ function c32056070.filter(c,att,used)
return c:GetBaseAttack()==2300 and c:IsRace(RACE_CYBERSE) and c:IsAttribute(att) and c:GetAttribute()&used==0
end
function c32056070.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 and not eg:IsExists(c32056070.filter,1,nil,0xff,0) then return false end
if chk==0 and not eg:IsExists(c32056070.filter,1,nil,ATTRIBUTE_ALL,0) then return false end
local b1=Duel.IsExistingMatchingCard(aux.nzatk,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
local b2=Duel.IsExistingMatchingCard(aux.disfilter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
local b3=Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
......@@ -23,7 +23,7 @@ function c38049541.costg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(c38049541.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATTRIBUTE)
local att=Duel.AnnounceAttribute(tp,1,0x7f)
local att=Duel.AnnounceAttribute(tp,1,ATTRIBUTE_ALL)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c38049541.filter,tp,LOCATION_MZONE,0,1,1,nil)
e:SetLabel(att)
......
......@@ -40,7 +40,7 @@ function c43739056.ctop(e,tp,eg,ep,ev,re,r,rp)
if c:IsRelateToEffect(e) and Duel.GetControl(c,1-tp) and Duel.SelectYesNo(tp,aux.Stringid(43739056,0)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATTRIBUTE)
local aat=Duel.AnnounceAttribute(tp,1,0xff-e:GetHandler():GetAttribute())
local aat=Duel.AnnounceAttribute(tp,1,ATTRIBUTE_ALL-e:GetHandler():GetAttribute())
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_ATTRIBUTE)
......
......@@ -68,7 +68,7 @@ end
function c45702014.atttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATTRIBUTE)
local att=Duel.AnnounceAttribute(tp,1,0xff-e:GetHandler():GetAttribute())
local att=Duel.AnnounceAttribute(tp,1,ATTRIBUTE_ALL-e:GetHandler():GetAttribute())
e:SetLabel(att)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,tp,LOCATION_GRAVE)
end
......
......@@ -66,7 +66,7 @@ end
function c46425662.atttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATTRIBUTE)
local att=Duel.AnnounceAttribute(tp,1,0xff-e:GetHandler():GetAttribute())
local att=Duel.AnnounceAttribute(tp,1,ATTRIBUTE_ALL-e:GetHandler():GetAttribute())
e:SetLabel(att)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,tp,LOCATION_GRAVE)
end
......
......@@ -15,7 +15,7 @@ function c48422921.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil)
local val=0xff
local val=ATTRIBUTE_ALL
local reg=g:GetFirst():GetFlagEffectLabel(48422921)
if reg then val=val-reg end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATTRIBUTE)
......
......@@ -42,7 +42,7 @@ end
function c54757758.atttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATTRIBUTE)
local aat=Duel.AnnounceAttribute(tp,1,0xff-e:GetHandler():GetAttribute())
local aat=Duel.AnnounceAttribute(tp,1,ATTRIBUTE_ALL-e:GetHandler():GetAttribute())
e:SetLabel(aat)
end
function c54757758.attop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -35,7 +35,7 @@ end
function c56704140.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATTRIBUTE)
local aat=Duel.AnnounceAttribute(tp,1,0x7f)
local aat=Duel.AnnounceAttribute(tp,1,ATTRIBUTE_ALL)
e:SetLabel(aat)
end
function c56704140.operation(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -38,7 +38,7 @@ function c60226558.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectTarget(tp,c60226558.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATTRIBUTE)
local att=Duel.AnnounceAttribute(tp,1,0xff-g:GetFirst():GetAttribute())
local att=Duel.AnnounceAttribute(tp,1,ATTRIBUTE_ALL-g:GetFirst():GetAttribute())
e:SetLabel(att)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
......
......@@ -64,7 +64,7 @@ end
function c72819261.atttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATTRIBUTE)
local att=Duel.AnnounceAttribute(tp,1,0xff-e:GetHandler():GetAttribute())
local att=Duel.AnnounceAttribute(tp,1,ATTRIBUTE_ALL-e:GetHandler():GetAttribute())
e:SetLabel(att)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,tp,LOCATION_GRAVE)
end
......
......@@ -73,7 +73,7 @@ function c74567889.seqop(e,tp,eg,ep,ev,re,r,rp)
Duel.MoveSequence(c,nseq)
if c:GetSequence()==nseq and Duel.SelectEffectYesNo(tp,c,aux.Stringid(74567889,2)) then
Duel.BreakEffect()
local attr=Duel.AnnounceAttribute(tp,1,0xff-c:GetAttribute())
local attr=Duel.AnnounceAttribute(tp,1,ATTRIBUTE_ALL-c:GetAttribute())
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_ATTRIBUTE)
......
......@@ -67,7 +67,7 @@ end
function c83032858.atttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATTRIBUTE)
local att=Duel.AnnounceAttribute(tp,1,0xff-e:GetHandler():GetAttribute())
local att=Duel.AnnounceAttribute(tp,1,ATTRIBUTE_ALL-e:GetHandler():GetAttribute())
e:SetLabel(att)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,tp,LOCATION_GRAVE)
end
......
......@@ -53,7 +53,7 @@ end
function c8522996.chtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATTRIBUTE)
local aat=Duel.AnnounceAttribute(tp,1,0x7f)
local aat=Duel.AnnounceAttribute(tp,1,ATTRIBUTE_ALL)
e:SetLabel(aat)
end
function c8522996.chop(e,tp,eg,ep,ev,re,r,rp)
......@@ -78,5 +78,5 @@ function c8522996.condition(e,c)
return c:IsAttribute(e:GetHandler():GetAttribute())
end
function c8522996.splimit(e,c,tp,sumtp,sumpos)
return c:IsAttribute(0xff-e:GetHandler():GetAttribute())
return c:IsAttribute(ATTRIBUTE_ALL-e:GetHandler():GetAttribute())
end
......@@ -17,7 +17,7 @@ end
function c89801755.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATTRIBUTE)
local att=Duel.AnnounceAttribute(tp,1,0xff)
local att=Duel.AnnounceAttribute(tp,1,ATTRIBUTE_ALL)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RACE)
local rc=Duel.AnnounceRace(tp,1,RACE_ALL)
e:SetLabel(att)
......
......@@ -18,7 +18,7 @@ end
function c94016752.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATTRIBUTE)
local att=Duel.AnnounceAttribute(tp,1,0xff)
local att=Duel.AnnounceAttribute(tp,1,ATTRIBUTE_ALL)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RACE)
local rc=Duel.AnnounceRace(tp,1,RACE_ALL)
e:SetLabel(att)
......
......@@ -29,7 +29,7 @@ function c94331452.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,c94331452.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATTRIBUTE)
local rc=Duel.AnnounceAttribute(tp,1,0xff-g:GetFirst():GetAttribute())
local rc=Duel.AnnounceAttribute(tp,1,ATTRIBUTE_ALL-g:GetFirst():GetAttribute())
e:SetLabel(rc)
end
function c94331452.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
......@@ -38,7 +38,7 @@ function c94331452.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,c94331452.filter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATTRIBUTE)
local rc=Duel.AnnounceAttribute(tp,1,0xff-g:GetFirst():GetAttribute())
local rc=Duel.AnnounceAttribute(tp,1,ATTRIBUTE_ALL-g:GetFirst():GetAttribute())
e:SetLabel(rc)
end
function c94331452.operation(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -55,7 +55,7 @@ end
function c9505425.atttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATTRIBUTE)
local aat=Duel.AnnounceAttribute(tp,1,0xff-e:GetHandler():GetAttribute())
local aat=Duel.AnnounceAttribute(tp,1,ATTRIBUTE_ALL-e:GetHandler():GetAttribute())
e:SetLabel(aat)
end
function c9505425.attop(e,tp,eg,ep,ev,re,r,rp)
......
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