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

fix

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