Commit de47c60b authored by nanahira's avatar nanahira

Merge branch 'master' of ../ygopro-222DIY

parents 24bba9b9 2422327f
...@@ -637,6 +637,11 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) { ...@@ -637,6 +637,11 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
case irr::EMIE_MOUSE_WHEEL: { case irr::EMIE_MOUSE_WHEEL: {
if(!mainGame->scrFilter->isVisible()) if(!mainGame->scrFilter->isVisible())
break; break;
if(mainGame->env->hasFocus(mainGame->scrFilter))
break;
irr::gui::IGUIElement* root = mainGame->env->getRootGUIElement();
if(root->getElementFromPoint(mouse_pos) != root)
break;
if(event.MouseInput.Wheel < 0) { if(event.MouseInput.Wheel < 0) {
if(mainGame->scrFilter->getPos() < mainGame->scrFilter->getMax()) if(mainGame->scrFilter->getPos() < mainGame->scrFilter->getMax())
mainGame->scrFilter->setPos(mainGame->scrFilter->getPos() + 1); mainGame->scrFilter->setPos(mainGame->scrFilter->getPos() + 1);
......
...@@ -194,6 +194,7 @@ void DuelClient::ClientEvent(bufferevent *bev, short events, void *ctx) { ...@@ -194,6 +194,7 @@ void DuelClient::ClientEvent(bufferevent *bev, short events, void *ctx) {
mainGame->btnJoinCancel->setEnabled(true); mainGame->btnJoinCancel->setEnabled(true);
mainGame->btnStartBot->setEnabled(true); mainGame->btnStartBot->setEnabled(true);
mainGame->btnBotCancel->setEnabled(true); mainGame->btnBotCancel->setEnabled(true);
mainGame->stTip->setVisible(false);
mainGame->gMutex.Unlock(); mainGame->gMutex.Unlock();
mainGame->closeDoneSignal.Reset(); mainGame->closeDoneSignal.Reset();
mainGame->closeSignal.Set(); mainGame->closeSignal.Set();
......
...@@ -1803,6 +1803,10 @@ bool ClientField::OnCommonEvent(const irr::SEvent& event) { ...@@ -1803,6 +1803,10 @@ bool ClientField::OnCommonEvent(const irr::SEvent& event) {
case irr::gui::EGET_SCROLL_BAR_CHANGED: { case irr::gui::EGET_SCROLL_BAR_CHANGED: {
switch(id) { switch(id) {
case SCROLL_CARDTEXT: { case SCROLL_CARDTEXT: {
if(!mainGame->scrCardText->isVisible()) {
return true;
break;
}
u32 pos = mainGame->scrCardText->getPos(); u32 pos = mainGame->scrCardText->getPos();
mainGame->SetStaticText(mainGame->stText, mainGame->stText->getRelativePosition().getWidth() - 25, mainGame->textFont, mainGame->showingtext, pos); mainGame->SetStaticText(mainGame->stText, mainGame->stText->getRelativePosition().getWidth() - 25, mainGame->textFont, mainGame->showingtext, pos);
return true; return true;
......
...@@ -736,7 +736,7 @@ void Game::MainLoop() { ...@@ -736,7 +736,7 @@ void Game::MainLoop() {
atkdy = (float)sin(atkframe); atkdy = (float)sin(atkframe);
driver->beginScene(true, true, SColor(0, 0, 0, 0)); driver->beginScene(true, true, SColor(0, 0, 0, 0));
gMutex.Lock(); gMutex.Lock();
if(dInfo.isStarted) { if(dInfo.isStarted || dInfo.isReplaySkiping) {
DrawBackImage(imageManager.tBackGround); DrawBackImage(imageManager.tBackGround);
DrawBackGround(); DrawBackGround();
DrawCards(); DrawCards();
...@@ -816,6 +816,8 @@ void Game::InitStaticText(irr::gui::IGUIStaticText* pControl, u32 cWidth, u32 cH ...@@ -816,6 +816,8 @@ void Game::InitStaticText(irr::gui::IGUIStaticText* pControl, u32 cWidth, u32 cH
SetStaticText(pControl, cWidth, font, text); SetStaticText(pControl, cWidth, font, text);
if(font->getDimension(dataManager.strBuffer).Height <= cHeight) { if(font->getDimension(dataManager.strBuffer).Height <= cHeight) {
scrCardText->setVisible(false); scrCardText->setVisible(false);
if(env->hasFocus(scrCardText))
env->removeFocus(scrCardText);
return; return;
} }
SetStaticText(pControl, cWidth-25, font, text); SetStaticText(pControl, cWidth-25, font, text);
......
...@@ -113,6 +113,7 @@ public: ...@@ -113,6 +113,7 @@ public:
#define EFFECT_ADD_LINK_MARKER_KOISHI 37564151 #define EFFECT_ADD_LINK_MARKER_KOISHI 37564151
#define EFFECT_REMOVE_LINK_MARKER_KOISHI 37564152 #define EFFECT_REMOVE_LINK_MARKER_KOISHI 37564152
#define EFFECT_CANNOT_LOSE_KOISHI 37564153 #define EFFECT_CANNOT_LOSE_KOISHI 37564153
#define EFFECT_EXTRA_TOMAIN_KOISHI 37564154
//status //status
#define EFFECT_STATUS_AVAILABLE 0x0001 #define EFFECT_STATUS_AVAILABLE 0x0001
......
...@@ -578,7 +578,7 @@ int32 field::get_useable_count_fromex(card* pcard, uint8 playerid, uint8 uplayer ...@@ -578,7 +578,7 @@ int32 field::get_useable_count_fromex(card* pcard, uint8 playerid, uint8 uplayer
pcard->current.location = LOCATION_EXTRA; pcard->current.location = LOCATION_EXTRA;
} }
int useable_count = 0; int useable_count = 0;
if(core.duel_rule >= 4) if(core.duel_rule >= 4 && !is_player_affected_by_effect(playerid, EFFECT_EXTRA_TOMAIN_KOISHI) && !pcard->is_affected_by_effect(EFFECT_EXTRA_TOMAIN_KOISHI))
useable_count = get_useable_count_fromex_rule4(pcard, playerid, uplayer, zone, list); useable_count = get_useable_count_fromex_rule4(pcard, playerid, uplayer, zone, list);
else else
useable_count = get_useable_count_other(pcard, playerid, LOCATION_MZONE, uplayer, LOCATION_REASON_TOFIELD, zone, list); useable_count = get_useable_count_other(pcard, playerid, LOCATION_MZONE, uplayer, LOCATION_REASON_TOFIELD, zone, list);
......
...@@ -698,6 +698,8 @@ interpreter::interpreter(duel* pd): coroutines(256) { ...@@ -698,6 +698,8 @@ interpreter::interpreter(duel* pd): coroutines(256) {
lua_setglobal(lua_state, "EFFECT_REMOVE_LINK_MARKER_KOISHI"); lua_setglobal(lua_state, "EFFECT_REMOVE_LINK_MARKER_KOISHI");
lua_pushinteger(lua_state, EFFECT_CANNOT_LOSE_KOISHI); lua_pushinteger(lua_state, EFFECT_CANNOT_LOSE_KOISHI);
lua_setglobal(lua_state, "EFFECT_CANNOT_LOSE_KOISHI"); lua_setglobal(lua_state, "EFFECT_CANNOT_LOSE_KOISHI");
lua_pushinteger(lua_state, EFFECT_EXTRA_TOMAIN_KOISHI);
lua_setglobal(lua_state, "EFFECT_EXTRA_TOMAIN_KOISHI");
//music hints //music hints
lua_pushinteger(lua_state, HINT_MUSIC); lua_pushinteger(lua_state, HINT_MUSIC);
lua_setglobal(lua_state, "HINT_MUSIC"); lua_setglobal(lua_state, "HINT_MUSIC");
......
...@@ -31,6 +31,10 @@ auto_search_limit = 2 ...@@ -31,6 +31,10 @@ auto_search_limit = 2
ignore_deck_changes = 0 ignore_deck_changes = 0
default_ot = 1 default_ot = 1
enable_bot_mode = 1 enable_bot_mode = 1
window_maximized = 0
window_width = 1024
window_height = 640
resize_popup_menu = 0
enable_sound = 1 enable_sound = 1
enable_music = 1 enable_music = 1
#Volume of sound and music, between 0 and 100 #Volume of sound and music, between 0 and 100
......
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