Commit 588a75d7 authored by Dark Zane's avatar Dark Zane Committed by GitHub

Merge branch 'fallenstardust:master' into master

parents 24b9d213 821d6e97
...@@ -2608,11 +2608,11 @@ void card::filter_effect_container(const effect_container& container, uint32_t c ...@@ -2608,11 +2608,11 @@ void card::filter_effect_container(const effect_container& container, uint32_t c
} }
void card::filter_effect(uint32_t code, effect_set* eset, uint8_t sort) { void card::filter_effect(uint32_t code, effect_set* eset, uint8_t sort) {
filter_effect_container(single_effect, code, default_single_filter, *eset); filter_effect_container(single_effect, code, default_single_filter, *eset);
for (const auto& pcard : equiping_cards) for (auto& pcard : equiping_cards)
filter_effect_container(pcard->equip_effect, code, default_equip_filter, *eset); filter_effect_container(pcard->equip_effect, code, default_equip_filter, *eset);
for (const auto& pcard : effect_target_owner) for (auto& pcard : effect_target_owner)
filter_effect_container(pcard->target_effect, code, default_target_filter, *eset); filter_effect_container(pcard->target_effect, code, default_target_filter, *eset);
for (const auto& pcard : xyz_materials) for (auto& pcard : xyz_materials)
filter_effect_container(pcard->xmaterial_effect, code, default_xmaterial_filter, *eset); filter_effect_container(pcard->xmaterial_effect, code, default_xmaterial_filter, *eset);
filter_effect_container(pduel->game_field->effects.aura_effect, code, default_aura_filter, *eset); filter_effect_container(pduel->game_field->effects.aura_effect, code, default_aura_filter, *eset);
if(sort) if(sort)
...@@ -2620,17 +2620,17 @@ void card::filter_effect(uint32_t code, effect_set* eset, uint8_t sort) { ...@@ -2620,17 +2620,17 @@ void card::filter_effect(uint32_t code, effect_set* eset, uint8_t sort) {
} }
void card::filter_single_continuous_effect(uint32_t code, effect_set* eset, uint8_t sort) { void card::filter_single_continuous_effect(uint32_t code, effect_set* eset, uint8_t sort) {
filter_effect_container(single_effect, code, accept_filter, *eset); filter_effect_container(single_effect, code, accept_filter, *eset);
for (const auto& pcard : equiping_cards) for (auto& pcard : equiping_cards)
filter_effect_container(pcard->equip_effect, code, accept_filter, *eset); filter_effect_container(pcard->equip_effect, code, accept_filter, *eset);
auto target_filter = [](card* c, effect* peffect) -> bool { auto target_filter = [](card* c, effect* peffect) -> bool {
return peffect->is_target(c); return peffect->is_target(c);
}; };
for (const auto& pcard : effect_target_owner) for (auto& pcard : effect_target_owner)
filter_effect_container(pcard->target_effect, code, target_filter, *eset); filter_effect_container(pcard->target_effect, code, target_filter, *eset);
auto xmaterial_filter = [](card* c, effect* peffect) -> bool { auto xmaterial_filter = [](card* c, effect* peffect) -> bool {
return !(peffect->type & EFFECT_TYPE_FIELD); return !(peffect->type & EFFECT_TYPE_FIELD);
}; };
for (const auto& pcard : xyz_materials) for (auto& pcard : xyz_materials)
filter_effect_container(pcard->xmaterial_effect, code, xmaterial_filter, *eset); filter_effect_container(pcard->xmaterial_effect, code, xmaterial_filter, *eset);
if(sort) if(sort)
eset->sort(); eset->sort();
...@@ -2643,7 +2643,7 @@ void card::filter_self_effect(uint32_t code, effect_set* eset, uint8_t sort) { ...@@ -2643,7 +2643,7 @@ void card::filter_self_effect(uint32_t code, effect_set* eset, uint8_t sort) {
auto xmaterial_filter = [](card* c, effect* peffect) -> bool { auto xmaterial_filter = [](card* c, effect* peffect) -> bool {
return !(peffect->type & EFFECT_TYPE_FIELD); return !(peffect->type & EFFECT_TYPE_FIELD);
}; };
for (const auto& pcard : xyz_materials) for (auto& pcard : xyz_materials)
filter_effect_container(pcard->xmaterial_effect, code, xmaterial_filter, *eset); filter_effect_container(pcard->xmaterial_effect, code, xmaterial_filter, *eset);
if (sort) if (sort)
eset->sort(); eset->sort();
...@@ -2652,17 +2652,17 @@ void card::filter_self_effect(uint32_t code, effect_set* eset, uint8_t sort) { ...@@ -2652,17 +2652,17 @@ void card::filter_self_effect(uint32_t code, effect_set* eset, uint8_t sort) {
void card::filter_immune_effect() { void card::filter_immune_effect() {
immune_effect.clear(); immune_effect.clear();
filter_effect_container(single_effect, EFFECT_IMMUNE_EFFECT, accept_filter, immune_effect); filter_effect_container(single_effect, EFFECT_IMMUNE_EFFECT, accept_filter, immune_effect);
for (const auto& pcard : equiping_cards) for (auto& pcard : equiping_cards)
filter_effect_container(pcard->equip_effect, EFFECT_IMMUNE_EFFECT, accept_filter, immune_effect); filter_effect_container(pcard->equip_effect, EFFECT_IMMUNE_EFFECT, accept_filter, immune_effect);
auto target_filter = [](card* c, effect* peffect) -> bool { auto target_filter = [](card* c, effect* peffect) -> bool {
return peffect->is_target(c); return peffect->is_target(c);
}; };
for (const auto& pcard : effect_target_owner) for (auto& pcard : effect_target_owner)
filter_effect_container(pcard->target_effect, EFFECT_IMMUNE_EFFECT, target_filter, immune_effect); filter_effect_container(pcard->target_effect, EFFECT_IMMUNE_EFFECT, target_filter, immune_effect);
auto xmaterial_filter = [](card* c, effect* peffect) -> bool { auto xmaterial_filter = [](card* c, effect* peffect) -> bool {
return !(peffect->type & EFFECT_TYPE_FIELD); return !(peffect->type & EFFECT_TYPE_FIELD);
}; };
for (const auto& pcard : xyz_materials) for (auto& pcard : xyz_materials)
filter_effect_container(pcard->xmaterial_effect, EFFECT_IMMUNE_EFFECT, xmaterial_filter, immune_effect); filter_effect_container(pcard->xmaterial_effect, EFFECT_IMMUNE_EFFECT, xmaterial_filter, immune_effect);
filter_effect_container(pduel->game_field->effects.aura_effect, EFFECT_IMMUNE_EFFECT, target_filter, immune_effect); filter_effect_container(pduel->game_field->effects.aura_effect, EFFECT_IMMUNE_EFFECT, target_filter, immune_effect);
immune_effect.sort(); immune_effect.sort();
...@@ -2930,17 +2930,17 @@ effect* card::is_affected_by_effect(uint32_t code) { ...@@ -2930,17 +2930,17 @@ effect* card::is_affected_by_effect(uint32_t code) {
effect* peffect = find_effect(single_effect, code, default_single_filter); effect* peffect = find_effect(single_effect, code, default_single_filter);
if (peffect) if (peffect)
return peffect; return peffect;
for (const auto& pcard : equiping_cards) { for (auto& pcard : equiping_cards) {
peffect = find_effect(pcard->equip_effect, code, default_equip_filter); peffect = find_effect(pcard->equip_effect, code, default_equip_filter);
if (peffect) if (peffect)
return peffect; return peffect;
} }
for (const auto& pcard : effect_target_owner) { for (auto& pcard : effect_target_owner) {
peffect = find_effect(pcard->target_effect, code, default_target_filter); peffect = find_effect(pcard->target_effect, code, default_target_filter);
if (peffect) if (peffect)
return peffect; return peffect;
} }
for (const auto& pcard : xyz_materials) { for (auto& pcard : xyz_materials) {
peffect = find_effect(pcard->xmaterial_effect, code, default_xmaterial_filter); peffect = find_effect(pcard->xmaterial_effect, code, default_xmaterial_filter);
if (peffect) if (peffect)
return peffect; return peffect;
...@@ -2960,7 +2960,7 @@ effect* card::is_affected_by_effect(int32_t code, card* target) { ...@@ -2960,7 +2960,7 @@ effect* card::is_affected_by_effect(int32_t code, card* target) {
auto equip_filter = [](card* c, effect* peffect, card* target) -> bool { auto equip_filter = [](card* c, effect* peffect, card* target) -> bool {
return default_equip_filter(c, peffect) && peffect->get_value(target); return default_equip_filter(c, peffect) && peffect->get_value(target);
}; };
for (const auto& pcard : equiping_cards) { for (auto& pcard : equiping_cards) {
peffect = find_effect_with_target(pcard->equip_effect, code, equip_filter, target); peffect = find_effect_with_target(pcard->equip_effect, code, equip_filter, target);
if (peffect) if (peffect)
return peffect; return peffect;
...@@ -2968,7 +2968,7 @@ effect* card::is_affected_by_effect(int32_t code, card* target) { ...@@ -2968,7 +2968,7 @@ effect* card::is_affected_by_effect(int32_t code, card* target) {
auto target_filter = [](card* c, effect* peffect, card* target) -> bool { auto target_filter = [](card* c, effect* peffect, card* target) -> bool {
return default_target_filter(c, peffect) && peffect->get_value(target); return default_target_filter(c, peffect) && peffect->get_value(target);
}; };
for (const auto& pcard : effect_target_owner) { for (auto& pcard : effect_target_owner) {
peffect = find_effect_with_target(pcard->target_effect, code, target_filter, target); peffect = find_effect_with_target(pcard->target_effect, code, target_filter, target);
if (peffect) if (peffect)
return peffect; return peffect;
...@@ -2976,7 +2976,7 @@ effect* card::is_affected_by_effect(int32_t code, card* target) { ...@@ -2976,7 +2976,7 @@ effect* card::is_affected_by_effect(int32_t code, card* target) {
auto xmaterial_filter = [](card* c, effect* peffect, card* target) -> bool { auto xmaterial_filter = [](card* c, effect* peffect, card* target) -> bool {
return default_xmaterial_filter(c, peffect) && peffect->get_value(target); return default_xmaterial_filter(c, peffect) && peffect->get_value(target);
}; };
for (const auto& pcard : xyz_materials) { for (auto& pcard : xyz_materials) {
peffect = find_effect_with_target(pcard->xmaterial_effect, code, xmaterial_filter, target); peffect = find_effect_with_target(pcard->xmaterial_effect, code, xmaterial_filter, target);
if (peffect) if (peffect)
return peffect; return peffect;
...@@ -4151,7 +4151,7 @@ int32_t card::is_can_be_link_material(card* scard) { ...@@ -4151,7 +4151,7 @@ int32_t card::is_can_be_link_material(card* scard) {
* @param filter Lua function filter(e) * @param filter Lua function filter(e)
*/ */
int32_t card::is_original_effect_property(int32_t filter) { int32_t card::is_original_effect_property(int32_t filter) {
for (const auto& peffect : initial_effect) { for (auto& peffect : initial_effect) {
pduel->lua->add_param(peffect, PARAM_TYPE_EFFECT); pduel->lua->add_param(peffect, PARAM_TYPE_EFFECT);
if (pduel->lua->check_condition(filter, 1)) if (pduel->lua->check_condition(filter, 1))
return TRUE; return TRUE;
...@@ -4162,7 +4162,7 @@ int32_t card::is_original_effect_property(int32_t filter) { ...@@ -4162,7 +4162,7 @@ int32_t card::is_original_effect_property(int32_t filter) {
* @param filter Lua function filter(e) * @param filter Lua function filter(e)
*/ */
int32_t card::is_effect_property(int32_t filter) { int32_t card::is_effect_property(int32_t filter) {
for (const auto& peffect : initial_effect) { for (auto& peffect : initial_effect) {
if (current.is_location(LOCATION_MZONE) && !peffect->is_monster_effect()) if (current.is_location(LOCATION_MZONE) && !peffect->is_monster_effect())
continue; continue;
if (current.is_location(LOCATION_SZONE) && !peffect->in_range(this)) if (current.is_location(LOCATION_SZONE) && !peffect->in_range(this))
...@@ -4171,7 +4171,7 @@ int32_t card::is_effect_property(int32_t filter) { ...@@ -4171,7 +4171,7 @@ int32_t card::is_effect_property(int32_t filter) {
if(pduel->lua->check_condition(filter, 1)) if(pduel->lua->check_condition(filter, 1))
return TRUE; return TRUE;
} }
for (const auto& peffect : owning_effect) { for (auto& peffect : owning_effect) {
if (current.is_location(LOCATION_MZONE) && !peffect->is_monster_effect()) if (current.is_location(LOCATION_MZONE) && !peffect->is_monster_effect())
continue; continue;
if (current.is_location(LOCATION_SZONE) && !peffect->in_range(this)) if (current.is_location(LOCATION_SZONE) && !peffect->in_range(this))
......
...@@ -801,11 +801,11 @@ int32_t field::get_szone_limit(uint8_t playerid, uint8_t uplayer, uint32_t reaso ...@@ -801,11 +801,11 @@ int32_t field::get_szone_limit(uint8_t playerid, uint8_t uplayer, uint32_t reaso
} }
uint32_t field::get_linked_zone(int32_t playerid) { uint32_t field::get_linked_zone(int32_t playerid) {
uint32_t zones = 0; uint32_t zones = 0;
for(const auto& pcard : player[playerid].list_mzone) { for(auto& pcard : player[playerid].list_mzone) {
if(pcard) if(pcard)
zones |= pcard->get_linked_zone() & 0xffff; zones |= pcard->get_linked_zone() & 0xffff;
} }
for(const auto& pcard : player[1 - playerid].list_mzone) { for(auto& pcard : player[1 - playerid].list_mzone) {
if(pcard) if(pcard)
zones |= pcard->get_linked_zone() >> 16; zones |= pcard->get_linked_zone() >> 16;
} }
...@@ -1932,7 +1932,7 @@ void field::ritual_release(const card_set& material) { ...@@ -1932,7 +1932,7 @@ void field::ritual_release(const card_set& material) {
card_set rel; card_set rel;
card_set rem; card_set rem;
card_set tgy; card_set tgy;
for(const auto& pcard : material) { for(auto& pcard : material) {
if(pcard->current.location == LOCATION_GRAVE) if(pcard->current.location == LOCATION_GRAVE)
rem.insert(pcard); rem.insert(pcard);
else if(pcard->current.location == LOCATION_OVERLAY || pcard->current.location == LOCATION_EXTRA) else if(pcard->current.location == LOCATION_OVERLAY || pcard->current.location == LOCATION_EXTRA)
......
...@@ -397,13 +397,13 @@ int32_t field::draw(uint16_t step, effect* reason_effect, uint32_t reason, uint8 ...@@ -397,13 +397,13 @@ int32_t field::draw(uint16_t step, effect* reason_effect, uint32_t reason, uint8
pduel->write_buffer8(MSG_DRAW); pduel->write_buffer8(MSG_DRAW);
pduel->write_buffer8(playerid); pduel->write_buffer8(playerid);
pduel->write_buffer8((uint8_t)cv.size()); pduel->write_buffer8((uint8_t)cv.size());
for (const auto& pcard : cv) for (auto& pcard : cv)
pduel->write_buffer32(pcard->data.code | (pcard->is_position(POS_FACEUP) ? 0x80000000 : 0)); pduel->write_buffer32(pcard->data.code | (pcard->is_position(POS_FACEUP) ? 0x80000000 : 0));
if(core.deck_reversed && (public_count < cv.size())) { if(core.deck_reversed && (public_count < cv.size())) {
pduel->write_buffer8(MSG_CONFIRM_CARDS); pduel->write_buffer8(MSG_CONFIRM_CARDS);
pduel->write_buffer8(1 - playerid); pduel->write_buffer8(1 - playerid);
pduel->write_buffer8((uint8_t)drawed_set->size()); pduel->write_buffer8((uint8_t)drawed_set->size());
for(const auto& pcard : *drawed_set) { for(auto& pcard : *drawed_set) {
pduel->write_buffer32(pcard->data.code); pduel->write_buffer32(pcard->data.code);
pduel->write_buffer8(pcard->current.controler); pduel->write_buffer8(pcard->current.controler);
pduel->write_buffer8(pcard->current.location); pduel->write_buffer8(pcard->current.location);
......
...@@ -41,8 +41,9 @@ ...@@ -41,8 +41,9 @@
</pre> </pre>
<h3 style="color:#ff0000">注意</h3> <h3 style="color:#ff0000">注意</h3>
<pre> <pre>
①:目前32位CPU的手机不能使用单机人机,可以打在线人机。 ①:请注意阅读用户隐私政策;
②:安装本软件时会根据系统语言来设置ygopro的语言,如果觉得不便可以在"我的"里修改资料语言; ②:安装本软件时会根据系统语言来设置ygopro的语言,
如果觉得不便可以在"我的"里修改资料语言;
③:卸载本软件将删除包含卡组在内的重要文件,卸载前请慎重; ③:卸载本软件将删除包含卡组在内的重要文件,卸载前请慎重;
</pre> </pre>
</body> </body>
......
...@@ -1243,3 +1243,7 @@ ...@@ -1243,3 +1243,7 @@
!setname 0x1c0 龙华 竜華 !setname 0x1c0 龙华 竜華
!setname 0x1c1 阿尔戈☆群星 ARGS !setname 0x1c1 阿尔戈☆群星 ARGS
!setname 0x1c2 喷水引擎 アクア・ジェット !setname 0x1c2 喷水引擎 アクア・ジェット
!setname 0x1c3 御剑 Mitsurugi
!setname 0x1c4 征龙 征竜
!setname 0x1c5 再世 再世
!setname 0x1c6 统王 ドミナス
\ No newline at end of file
#created by ... #created by ygomobile
#main #main
70095154 70095154
70095154 70095154
...@@ -14,9 +14,9 @@ ...@@ -14,9 +14,9 @@
1142880 1142880
1142880 1142880
56364287 56364287
56364287
63941210 63941210
10604644 10604644
10604644
72291078 72291078
14558128 14558128
14558127 14558127
...@@ -32,9 +32,9 @@ ...@@ -32,9 +32,9 @@
84797028 84797028
84797028 84797028
63995093 63995093
63995093
74335036 74335036
25311006 25311006
24299458
14532163 14532163
14532163 14532163
10045474 10045474
...@@ -45,15 +45,15 @@ ...@@ -45,15 +45,15 @@
8963089 8963089
84058253 84058253
84058253 84058253
27548199
37675907
10443957 10443957
58069384 58069384
4731783
71818935
50277355
44097050
46724542 46724542
27548199
37675907
44097050
50277355
65741786
29301450
41739381 41739381
41739381 41739381
!side !side
...@@ -71,4 +71,4 @@ ...@@ -71,4 +71,4 @@
54693926 54693926
54693926 54693926
54693926 54693926
23002292 23002292
\ No newline at end of file
...@@ -1236,5 +1236,9 @@ ...@@ -1236,5 +1236,9 @@
!setname 0x1be Ryzeal !setname 0x1be Ryzeal
!setname 0x1bf Maliss !setname 0x1bf Maliss
!setname 0x1c0 Ryu-Ge !setname 0x1c0 Ryu-Ge
!setname 0x1c1 ARGS !setname 0x1c1 Argostars
!setname 0x1c2 Aqua Jet !setname 0x1c2 Aqua Jet
!setname 0x1c3 Mitsurugi
!setname 0x1c4 Dragon Ruler
!setname 0x1c5 Regenesis
!setname 0x1c6 Dominus
...@@ -1202,7 +1202,7 @@ ...@@ -1202,7 +1202,7 @@
!setname 0x196 Nouvelles !setname 0x196 Nouvelles
!setname 0x197 Receta !setname 0x197 Receta
!setname 0x198 Visas !setname 0x198 Visas
!setname 0x199 Contraefecto !setname 0x199 Contra
!setname 0x19a Vedas !setname 0x19a Vedas
!setname 0x19b Diabell !setname 0x19b Diabell
!setname 0x119b Diabellstar !setname 0x119b Diabellstar
...@@ -1245,5 +1245,9 @@ ...@@ -1245,5 +1245,9 @@
!setname 0x1be Ryzeal !setname 0x1be Ryzeal
!setname 0x1bf Maliss !setname 0x1bf Maliss
!setname 0x1c0 Ryu-Ge !setname 0x1c0 Ryu-Ge
!setname 0x1c1 ARGS !setname 0x1c1 Argostars
!setname 0x1c2 Aqua Jet !setname 0x1c2 Aqua Jet
!setname 0x1c3 Mitsurugi
!setname 0x1c4 Señor Dragón
!setname 0x1c5 Regénesis
!setname 0x1c6 Dominus
...@@ -1246,4 +1246,8 @@ ...@@ -1246,4 +1246,8 @@
!setname 0x1bf M∀LICE !setname 0x1bf M∀LICE
!setname 0x1c0 竜華 !setname 0x1c0 竜華
!setname 0x1c1 ARG☆S !setname 0x1c1 ARG☆S
!setname 0x1c2 アクア・ジェット !setname 0x1c2 アクア・ジェット
\ No newline at end of file !setname 0x1c3 御剣
!setname 0x1c4 征竜
!setname 0x1c5 再世(リジェネシス)
!setname 0x1c6 ドミナス
\ No newline at end of file
...@@ -86,24 +86,29 @@ public class MainActivity extends HomeActivity implements BottomNavigationBar.On ...@@ -86,24 +86,29 @@ public class MainActivity extends HomeActivity implements BottomNavigationBar.On
dialog.showTitleBar(); dialog.showTitleBar();
dialog.setTitle(getString(R.string.settings_about_change_log)); dialog.setTitle(getString(R.string.settings_about_change_log));
dialog.loadUrl("file:///android_asset/changelog.html", Color.TRANSPARENT); dialog.loadUrl("file:///android_asset/changelog.html", Color.TRANSPARENT);
dialog.setLeftButtonText(R.string.help); dialog.setLeftButtonText(R.string.user_privacy_policy);
dialog.setLeftButtonListener((dlg, i) -> { dialog.setLeftButtonListener((dlg, i) -> {
dialog.setContentView(R.layout.dialog_help); dialog.dismiss();
dialog.setTitle(R.string.question); final DialogPlus dialogPlus = new DialogPlus(this);
dialog.hideButton(); dialogPlus.setTitle(R.string.user_privacy_policy);
dialog.show(); //根据系统语言复制特定资料文件
View viewDialog = dialog.getContentView(); String language = getContext().getResources().getConfiguration().locale.getLanguage();
Button btnMasterRule = viewDialog.findViewById(R.id.masterrule); String fileaddr = "";
Button btnTutorial = viewDialog.findViewById(R.id.tutorial); if (!language.isEmpty()) {
if (language.equals(AppsSettings.languageEnum.Chinese.name)) {
btnMasterRule.setOnClickListener((v) -> { fileaddr = "file:///android_asset/user_Privacy_Policy_CN.html";
WebActivity.open(this, getString(R.string.masterrule), Constants.URL_MASTER_RULE_CN); } else if (language.equals(AppsSettings.languageEnum.Korean.name)) {
dialog.dismiss(); fileaddr = "file:///android_asset/user_Privacy_Policy_KO.html";
}); } else if (language.equals(AppsSettings.languageEnum.Spanish.name)) {
btnTutorial.setOnClickListener((v) -> { fileaddr = "file:///android_asset/user_Privacy_Policy_ES.html";
WebActivity.open(this, getString(R.string.help), Constants.URL_HELP); } else if (language.equals(AppsSettings.languageEnum.Japanese)) {
dialog.dismiss(); fileaddr = "file:///android_asset/user_Privacy_Policy_JP.html";
}); } else {
fileaddr = "file:///android_asset/user_Privacy_Policy_EN.html";
}
}
dialogPlus.loadUrl(fileaddr, Color.TRANSPARENT);
dialogPlus.show();
}); });
dialog.setRightButtonText(R.string.OK); dialog.setRightButtonText(R.string.OK);
dialog.setRightButtonListener((dlg, i) -> { dialog.setRightButtonListener((dlg, i) -> {
......
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