Commit 1c94ecfb authored by argon.sun's avatar argon.sun

fix

parent cf17759e
......@@ -51,7 +51,7 @@ bool Game::Initialize() {
numFont = irr::gui::CGUITTFont::createTTFont(env, gameConf.numfont, 16);
adFont = irr::gui::CGUITTFont::createTTFont(env, gameConf.numfont, 12);
lpcFont = irr::gui::CGUITTFont::createTTFont(env, gameConf.numfont, 48);
guiFont = irr::gui::CGUITTFont::createTTFont(env, gameConf.textfont, 12);
guiFont = irr::gui::CGUITTFont::createTTFont(env, gameConf.textfont, gameConf.textfontsize);
textFont = guiFont;
smgr = device->getSceneManager();
device->setWindowCaption(L"[---]");
......@@ -635,6 +635,7 @@ void Game::LoadConfig() {
wchar_t wstr[256];
gameConf.antialias = 0;
gameConf.serverport = 7911;
gameConf.textfontsize = 12;
gameConf.nickname[0] = 0;
gameConf.gamename[0] = 0;
gameConf.lastdeck[0] = 0;
......@@ -661,6 +662,7 @@ void Game::LoadConfig() {
BufferIO::CopyWStr(wstr, gameConf.lastdeck, 64);
} else if(!strcmp(strbuf, "textfont")) {
BufferIO::DecodeUTF8(valbuf, wstr);
sscanf(linebuf, "%s = %s %d", strbuf, valbuf, &gameConf.textfontsize);
BufferIO::CopyWStr(wstr, gameConf.textfont, 256);
} else if(!strcmp(strbuf, "numfont")) {
BufferIO::DecodeUTF8(valbuf, wstr);
......@@ -690,7 +692,7 @@ void Game::SaveConfig() {
BufferIO::EncodeUTF8(gameConf.lastdeck, linebuf);
fprintf(fp, "lastdeck = %s\n", linebuf);
BufferIO::EncodeUTF8(gameConf.textfont, linebuf);
fprintf(fp, "textfont = %s\n", linebuf);
fprintf(fp, "textfont = %s %d\n", linebuf, gameConf.textfontsize);
BufferIO::EncodeUTF8(gameConf.numfont, linebuf);
fprintf(fp, "numfont = %s\n", linebuf);
fprintf(fp, "serverport = %d\n", gameConf.serverport);
......
......@@ -14,6 +14,7 @@ namespace ygo {
struct Config {
unsigned short antialias;
unsigned short serverport;
unsigned char textfontsize;
wchar_t lastip[20];
wchar_t lastport[10];
wchar_t nickname[20];
......
#[2011.9.1][2011.3.1]
!2011.3.1
#[2012.3.1][2011.9.1]
!2012.3.1
#forbidden
20663556 0 --イレカエル
44910027 0 --ヴィクトリー・ドラゴン
......
......@@ -6,6 +6,7 @@ function c28378427.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_BATTLE_DAMAGE)
e1:SetCondition(c28378427.condition)
e1:SetCost(c28378427.cost)
e1:SetTarget(c28378427.target)
e1:SetOperation(c28378427.activate)
c:RegisterEffect(e1)
......@@ -13,6 +14,10 @@ end
function c28378427.condition(e,tp,eg,ep,ev,re,r,rp)
return ep==tp
end
function c28378427.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function c28378427.filter(c,e,tp,dam)
return c:IsAttackBelow(dam) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
......
......@@ -18,10 +18,10 @@ function c30312361.initial_effect(c)
c:RegisterEffect(e2)
end
function c30312361.filter(c)
return c:IsType(TYPE_EFFECT) and c:IsAbleToRemove()
return c:IsType(TYPE_EFFECT) and not c:IsHasEffect(EFFECT_FORBIDDEN) and c:IsAbleToRemove()
end
function c30312361.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:GetLocation()==LOCATION_GRAVE and c30312361.filter(chkc) end
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c30312361.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c30312361.filter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,c30312361.filter,tp,LOCATION_GRAVE,0,1,1,nil)
......
......@@ -34,15 +34,17 @@ function c57139487.activate(e,tp,eg,ep,ev,re,r,rp)
local rg=Group.CreateGroup()
local tc=sg:GetFirst()
while tc do
local g1=nil
local tpe=tc:GetType()
if bit.band(tpe,0x802040)~=0 then
g1=Duel.GetMatchingGroup(Card.IsCode,tp,0,LOCATION_EXTRA,nil,tc:GetCode())
rg:Merge(g1)
elseif bit.band(tpe,TYPE_TOKEN)~=0 then
else
g1=Duel.GetMatchingGroup(Card.IsCode,tp,0,LOCATION_DECK+LOCATION_HAND,nil,tc:GetCode())
rg:Merge(g1)
if tc:IsLocation(LOCATION_REMOVED) then
local g1=nil
local tpe=tc:GetType()
if bit.band(tpe,0x802040)~=0 then
g1=Duel.GetMatchingGroup(Card.IsCode,tp,0,LOCATION_EXTRA,nil,tc:GetCode())
rg:Merge(g1)
elseif bit.band(tpe,TYPE_TOKEN)~=0 then
else
g1=Duel.GetMatchingGroup(Card.IsCode,tp,0,LOCATION_DECK+LOCATION_HAND,nil,tc:GetCode())
rg:Merge(g1)
end
end
tc=sg:GetNext()
end
......
......@@ -26,11 +26,12 @@ function c64332231.destg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c64332231.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
local rg=Duel.SelectReleaseGroupEx(tp,nil,1,g:GetCount(),nil)
local ct1=Duel.GetMatchingGroupCount(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
local rg=Duel.SelectReleaseGroupEx(tp,nil,1,ct1,nil)
Duel.Release(rg,REASON_EFFECT)
Duel.BreakEffect()
local ct2=rg:GetCount()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local dg=g:Select(tp,rg:GetCount(),rg:GetCount(),nil)
local dg=Duel.SelectMatchingCard(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,ct2,ct2,nil)
Duel.Destroy(dg,REASON_EFFECT)
end
......@@ -41,7 +41,7 @@ function c65737274.spop(e,tp,eg,ep,ev,re,r,rp)
end
end
function c65737274.cfilter(c,tp)
return c:IsRace(RACE_DRAGON) and Duel.IsExistingTarget(c65737274.lvfilter,tp,LOCATION_MZONE,0,1,nil)
return c:IsRace(RACE_DRAGON) and Duel.IsExistingTarget(c65737274.lvfilter,tp,LOCATION_MZONE,0,1,c)
end
function c65737274.lvfilter(c)
local lv=c:GetLevel()
......
......@@ -59,7 +59,7 @@ function c72989439.rmcost(e,tp,eg,ep,ev,re,r,rp,chk)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1,true)
c:RegisterFlagEffect(72989439,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1)
end
......
......@@ -48,12 +48,12 @@ function c81122844.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function c81122844.tgfilter(c,e)
return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEUP) and c:IsControler(tp)
and c:IsReason(REASON_DESTROY) and c:IsSetCard(0x58) and c:IsAbleToHand() and c:IsCanBeEffectTarget(e)
function c81122844.tgfilter(c,e,tp)
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) and c:IsControler(tp)
and c:IsReason(REASON_DESTROY) and c:IsSetCard(0x58) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() and c:IsCanBeEffectTarget(e)
end
function c81122844.thcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c81122844.tgfilter,1,nil,e)
return eg:IsExists(c81122844.tgfilter,1,nil,e,tp)
end
function c81122844.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return eg:IsContains(chkc) and c81122844.tgfilter(chkc,e) end
......
......@@ -12,7 +12,7 @@ function c89312388.initial_effect(c)
end
function c89312388.filter2(c,fc)
local fd=c:GetCode()
if not c:IsAbleToGraveAsCost() then return false end
if c:IsHasEffect(EFFECT_FORBIDDEN) or not c:IsAbleToGraveAsCost() then return false end
for i=1,fc.material_count do
if fd==fc.material[i] then return true end
end
......
......@@ -48,7 +48,7 @@ function c9596126.rmcost(e,tp,eg,ep,ev,re,r,rp,chk)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e:GetHandler():RegisterEffect(e1,true)
end
function c9596126.tgfilter(c)
......
......@@ -3,8 +3,8 @@
antialias = 2
nickname = Player
gamename = Game
lastdeck = Burn1
textfont = c:/windows/fonts/simsun.ttc
lastdeck = chaosls
textfont = c:/windows/fonts/simsun.ttc 14
numfont = c:/windows/fonts/arialbd.ttf
serverport = 7911
lastip = 192.168.3.235
......
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