Commit feb083ea authored by argon.sun's avatar argon.sun

black screen fix

parent 2cbec0a5
......@@ -82,7 +82,7 @@ int DeckManager::CheckLFList(Deck& deck, int lfhash, bool allow_ocg, bool allow_
return 1;
for(int i = 0; i < deck.main.size(); ++i) {
code_pointer cit = deck.main[i];
if((!allow_ocg && (cit->second.ot & 0x1)) || (!allow_ocg && (cit->second.ot & 0x2)))
if((!allow_ocg && (cit->second.ot == 0x1)) || (!allow_tcg && (cit->second.ot == 0x2)))
return cit->first;
int code = cit->second.alias ? cit->second.alias : cit->first;
ccount[code]++;
......@@ -93,7 +93,7 @@ int DeckManager::CheckLFList(Deck& deck, int lfhash, bool allow_ocg, bool allow_
}
for(int i = 0; i < deck.extra.size(); ++i) {
code_pointer cit = deck.extra[i];
if((!allow_ocg && (cit->second.ot & 0x1)) || (!allow_ocg && (cit->second.ot & 0x2)))
if((!allow_ocg && (cit->second.ot == 0x1)) || (!allow_tcg && (cit->second.ot == 0x2)))
return cit->first;
int code = cit->second.alias ? cit->second.alias : cit->first;
ccount[code]++;
......@@ -104,7 +104,7 @@ int DeckManager::CheckLFList(Deck& deck, int lfhash, bool allow_ocg, bool allow_
}
for(int i = 0; i < deck.side.size(); ++i) {
code_pointer cit = deck.side[i];
if((!allow_ocg && (cit->second.ot & 0x1)) || (!allow_ocg && (cit->second.ot & 0x2)))
if((!allow_ocg && (cit->second.ot == 0x1)) || (!allow_tcg && (cit->second.ot == 0x2)))
return cit->first;
int code = cit->second.alias ? cit->second.alias : cit->first;
ccount[code]++;
......
......@@ -197,7 +197,7 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) {
break;
}
case STOC_SELECT_HAND: {
mainGame->ShowElement(mainGame->wHand);
mainGame->wHand->setVisible(true);
break;
}
case STOC_SELECT_TP: {
......
......@@ -26,7 +26,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
case BUTTON_HAND1:
case BUTTON_HAND2:
case BUTTON_HAND3: {
mainGame->HideElement(mainGame->wHand);
mainGame->wHand->setVisible(false);
mainGame->stHintMsg->setText(L"");
mainGame->stHintMsg->setVisible(true);
CTOS_HandResult cshr;
......
--セイクリッド・ビーハイブ
function c2091298.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,c26329679.xyzfilter,2)
aux.AddXyzProcedure(c,c2091298.xyzfilter,2)
c:EnableReviveLimit()
--attack up
local e1=Effect.CreateEffect(c)
......
......@@ -24,7 +24,7 @@ function c23693634.initial_effect(c)
c:RegisterEffect(e2)
end
function c23693634.atkval(e,c)
return Duel.GetMatchingGroupCount(Card.IsRace,c:GetControler(),LOCATION_GRAVE,0,nil,RACE_WARRIOR)*100
return Duel.GetMatchingGroupCount(Card.IsRace,c:GetControler(),LOCATION_GRAVE,LOCATION_GRAVE,nil,RACE_WARRIOR)*100
end
function c23693634.sumcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetLocation()==LOCATION_GRAVE
......
......@@ -4,12 +4,16 @@ function c27541267.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c27541267.target)
e1:SetOperation(c27541267.operation)
c:RegisterEffect(e1)
end
function c27541267.filter(c)
return c:IsFaceup() and c:IsSetCard(0xa)
end
function c27541267.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c27541267.filter,tp,LOCATION_MZONE,0,1,nil) end
end
function c27541267.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c27541267.filter,tp,LOCATION_MZONE,0,nil)
local tc=g:GetFirst()
......
......@@ -59,6 +59,7 @@ function c40101111.rectg(e,tp,eg,ep,ev,re,r,rp,chk)
local rec=0
if c==a then rec=d:GetAttack()
else rec=a:GetAttack() end
if rec<0 then rec=0 end
Duel.SetTargetParam(rec)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,rec)
end
......
......@@ -3,7 +3,7 @@ function c41902352.initial_effect(c)
--synchro limit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:Setproperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
e1:SetCondition(c41902352.synlimit)
e1:SetValue(1)
......
......@@ -32,14 +32,15 @@ function c44635489.spcon(e,c)
and Duel.GetFieldGroupCount(c:GetControler(),0,LOCATION_MZONE,nil)>0
and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
end
function c44635489.filter(c)
return c:IsSetCard(0x53) and c:GetLevel()~=0
and ((c:IsLocation(LOCATION_MZONE) and c:IsFaceup()) or (c:IsLocation(LOCATION_GRAVE) and not c:IsHasEffect(EFFECT_NECRO_VALLEY)))
function c44635489.filter(c,clv)
local lv=c:GetLevel()
return c:IsSetCard(0x53) and lv~=0 and lv~=clv
and ((c:IsLocation(LOCATION_MZONE) and c:IsFaceup()) or c:IsLocation(LOCATION_GRAVE))
end
function c44635489.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and c44635489.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c44635489.filter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,e:GetHandler()) end
Duel.SelectTarget(tp,c44635489.filter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,e:GetHandler())
if chk==0 then return Duel.IsExistingTarget(c44635489.filter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,e:GetHandler(),e:GetHandler():GetLevel()) end
Duel.SelectTarget(tp,c44635489.filter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,e:GetHandler(),e:GetHandler():GetLevel())
end
function c44635489.lvop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
......
......@@ -13,6 +13,8 @@ function c57421866.initial_effect(c)
--unreleaseable nonsum
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_UNRELEASEABLE_NONSUM)
e2:SetValue(1)
c:RegisterEffect(e2)
......
......@@ -22,7 +22,7 @@ function c90156158.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.RegisterEffect(e1,tp)
end
function c90156158.filter(c)
return c:IsSetCard(0x53) and c:IsType(TYPE_MONSTER)
return c:IsSetCard(0x53) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c90156158.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c90156158.filter(chkc) end
......
......@@ -102,7 +102,9 @@ function c9888196.hdop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(sg,REASON_EFFECT)
local tc=sg:GetFirst()
while tc do
atk=atk+tc:GetAttack()
local tatk=tc:GetAttack()
if tatk<0 then tatk=0 end
atk=atk+tatk
tc=sg:GetNext()
end
Duel.BreakEffect()
......
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