From 608c1314e4db3cbb6653fe8e1a2cfc9413302747 Mon Sep 17 00:00:00 2001 From: shenhuyong Date: Sun, 29 Sep 2013 15:17:34 +0800 Subject: * Fixed Bug #7713 http://hercules.ws/board/tracker/issue-7713-bnogemstone-reverted/ Per official behavior, Mistress card effect removes all gemstone requirements on all skills EXCEPT Hocus Pocus and Ganbantein. --- src/map/skill.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/map/skill.c b/src/map/skill.c index 127eb1aa2..fe9703741 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -13584,16 +13584,18 @@ struct skill_condition skill_get_requirement(struct map_session_data* sd, uint16 if( itemid_isgemstone(req.itemid[i]) && skill_id != HW_GANBANTEIN ) { if( sd->special_state.no_gemstone ) - { //Make it substract 1 gem rather than skipping the cost. - if( --req.amount[i] < 1 ) - req.itemid[i] = 0; + { // All gem skills except Hocus Pocus and Ganbantein can cast for free with Mistress card -helvetica + if( skill_id != SA_ABRACADABRA ) + req.itemid[i] = req.amount[i] = 0; + else if( --req.amount[i] < 1 ) + req.amount[i] = 1; // Hocus Pocus always use at least 1 gem } if(sc && sc->data[SC_INTOABYSS]) { if( skill_id != SA_ABRACADABRA ) req.itemid[i] = req.amount[i] = 0; else if( --req.amount[i] < 1 ) - req.amount[i] = 1; // Hocus Pocus allways use at least 1 gem + req.amount[i] = 1; // Hocus Pocus always use at least 1 gem } } if( skill_id >= HT_SKIDTRAP && skill_id <= HT_TALKIEBOX && pc->checkskill(sd, RA_RESEARCHTRAP) > 0){ -- cgit v1.2.3-70-g09d2 From 715016aa21dae454fbe430e9c806fd8cef769a27 Mon Sep 17 00:00:00 2001 From: shenhuyong Date: Sun, 29 Sep 2013 16:00:40 +0800 Subject: * Fixed Bug #7708 http://hercules.ws/board/tracker/issue-7708-mandragora-howl-chance-way-too-high/ Mandragora Howl chance --- way too high. Base on a patch of the fix made by Rytech in 3ceam. --- db/re/skill_db.txt | 2 +- src/map/skill.c | 17 +++++++++++------ src/map/status.c | 5 +---- 3 files changed, 13 insertions(+), 11 deletions(-) (limited to 'src') diff --git a/db/re/skill_db.txt b/db/re/skill_db.txt index 9296d34da..723545f0a 100644 --- a/db/re/skill_db.txt +++ b/db/re/skill_db.txt @@ -1009,7 +1009,7 @@ 2489,11,6,1,0,0,0,10,1:2:3:4:5:6:7:8:9:10,no,0,0,0,weapon,0, GN_FIRE_EXPANSION_ACID,Fire Expansion Acid 2490,9,6,2,0,0x3,1,5,1,yes,0,0x80,2:3:4:5:6,none,0, GN_HELLS_PLANT,Hell's Plant 2491,0,6,1,0,0xC0,0,5,1,no,0,0,0,misc,0, GN_HELLS_PLANT_ATK,Hell's Plant Attack -2492,0,6,4,0,0x3,6:7:8:9:10,5,1,yes,0,0,0,none,0, GN_MANDRAGORA,Howling of Mandragora +2492,0,6,4,0,0x3,5:6:6:7:7,5,1,yes,0,0,0,none,0, GN_MANDRAGORA,Howling of Mandragora 2493,11,6,16,0,0x1,0,1,1,yes,0,0,0,none,0, GN_SLINGITEM,Sling Item 2494,0,6,4,0,0x1,0,1,1,no,0,0,0,none,0, GN_CHANGEMATERIAL,Change Material 2495,0,6,4,0,0x1,0,2,1,no,0,0,0,none,0, GN_MIX_COOKING,Mix Cooking diff --git a/src/map/skill.c b/src/map/skill.c index fe9703741..ae69738a6 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -8915,12 +8915,17 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui case GN_MANDRAGORA: if( flag&1 ) { - if ( clif->skill_nodamage(bl, src, skill_id, skill_lv, - sc_start(bl, type, 25 + 10 * skill_lv, skill_lv, skill->get_time(skill_id, skill_lv))) ) - status_zap(bl, 0, status_get_max_sp(bl) * (25 + 5 * skill_lv) / 100); - } else - map->foreachinrange(skill->area_sub, bl, skill->get_splash(skill_id, skill_lv), BL_CHAR, - src, skill_id, skill_lv, tick, flag|BCT_ENEMY|1, skill->castend_nodamage_id); + int chance = 25 + 10 * skill_lv - (status_get_vit(bl) + status_get_luk(bl)) / 5; + if ( chance < 10 ) + chance = 10;//Minimal chance is 10%. + if ( rand()%100 < chance ) {//Coded to both inflect the status and drain the target's SP only when successful. [Rytech] + sc_start(bl, type, 100, skill_lv, skill->get_time(skill_id, skill_lv)); + status_zap(bl, 0, status_get_max_sp(bl) * (25 + 5 * skill_lv) / 100); + } + } else if ( sd ) { + map->foreachinrange(skill->area_sub, bl, skill->get_splash(skill_id, skill_lv), BL_CHAR,src, skill_id, skill_lv, tick, flag|BCT_ENEMY|1, skill_castend_nodamage_id); + clif->skill_nodamage(bl, src, skill_id, skill_lv, 1); + } break; case GN_SLINGITEM: diff --git a/src/map/status.c b/src/map/status.c index dbce2f7f4..bb2efb505 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -4277,7 +4277,7 @@ static unsigned short status_calc_int(struct block_list *bl, struct status_chang if(sc->data[SC_MARIONETTE]) int_ += ((sc->data[SC_MARIONETTE]->val4)>>16)&0xFF; if(sc->data[SC_MANDRAGORA]) - int_ -= 5 + 5 * sc->data[SC_MANDRAGORA]->val1; + int_ -= 4 * sc->data[SC_MANDRAGORA]->val1; if(sc->data[SC_COCKTAIL_WARG_BLOOD]) int_ += sc->data[SC_COCKTAIL_WARG_BLOOD]->val1; if(sc->data[SC_INSPIRATION]) @@ -6328,9 +6328,6 @@ int status_get_sc_def(struct block_list *bl, enum sc_type type, int rate, int ti tick -= 1000 * ((status->get_lv(bl) / 10) + ((sd?sd->status.job_level:0) / 5)); tick = max(tick,10000); break; - case SC_MANDRAGORA: - sc_def = (st->vit+st->luk)/5; - break; case SC_KYOUGAKU: tick -= 1000 * status_get_int(bl) / 20; break; -- cgit v1.2.3-70-g09d2 From ea84a19426cd401615421ee3f3d2eff2d741beb7 Mon Sep 17 00:00:00 2001 From: shenhuyong Date: Sun, 29 Sep 2013 22:17:00 +0800 Subject: skill->castend_nodamage_id instead of skill_castend_nodamage_id --- src/map/skill.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/map/skill.c b/src/map/skill.c index ae69738a6..148f2bccf 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -8062,7 +8062,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui int rate = 45 + 5 * skill_lv; if( rnd()%100 < rate ){ clif->skill_nodamage(src, bl, skill_id, skill_lv, 1); - map->foreachinrange(skill->area_sub,bl,skill->get_splash(skill_id,skill_lv),BL_CHAR,src,skill_id,skill_lv,tick,flag|BCT_ENEMY|1,skill_castend_nodamage_id); + map->foreachinrange(skill->area_sub,bl,skill->get_splash(skill_id,skill_lv),BL_CHAR,src,skill_id,skill_lv,tick,flag|BCT_ENEMY|1,skill->castend_nodamage_id); }else if( sd ) // Failure on Rate clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0); } @@ -8923,7 +8923,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui status_zap(bl, 0, status_get_max_sp(bl) * (25 + 5 * skill_lv) / 100); } } else if ( sd ) { - map->foreachinrange(skill->area_sub, bl, skill->get_splash(skill_id, skill_lv), BL_CHAR,src, skill_id, skill_lv, tick, flag|BCT_ENEMY|1, skill_castend_nodamage_id); + map->foreachinrange(skill->area_sub, bl, skill->get_splash(skill_id, skill_lv), BL_CHAR,src, skill_id, skill_lv, tick, flag|BCT_ENEMY|1, skill->castend_nodamage_id); clif->skill_nodamage(bl, src, skill_id, skill_lv, 1); } break; -- cgit v1.2.3-70-g09d2 From d6965a8072c5a768f798a4a58e525b695c702afd Mon Sep 17 00:00:00 2001 From: Haru Date: Sat, 5 Oct 2013 07:38:19 +0200 Subject: Added 'buildclean' target to all makefiles - By invoking 'make buildclean', you can clean up all the build intermediate (object) files, without deleting any of the built executables and plugins. - To delete everything, use 'make clean', as you've always done. Signed-off-by: Haru --- 3rdparty/libconfig/Makefile.in | 17 ++++++++++------- 3rdparty/mt19937ar/Makefile.in | 17 ++++++++++------- Makefile.in | 8 ++++++-- src/char/Makefile.in | 12 +++++++++--- src/common/Makefile.in | 17 ++++++++++------- src/login/Makefile.in | 12 +++++++++--- src/map/Makefile.in | 12 +++++++++--- src/plugins/Makefile.in | 12 +++++++++--- src/test/Makefile.in | 10 +++++++--- src/tool/Makefile.in | 20 +++++++++++++------- 10 files changed, 92 insertions(+), 45 deletions(-) (limited to 'src') diff --git a/3rdparty/libconfig/Makefile.in b/3rdparty/libconfig/Makefile.in index 048a1b3b7..88c5eba96 100644 --- a/3rdparty/libconfig/Makefile.in +++ b/3rdparty/libconfig/Makefile.in @@ -8,19 +8,22 @@ CC = @CC@ export CC ##################################################################### -.PHONY: all clean help +.PHONY: all clean buildclean help all: $(LIBCONFIG_OBJ) -clean: - @echo " CLEAN libconfig" +buildclean: + @echo " CLEAN libconfig (build temp files)" @rm -rf *.o +clean: buildclean + @echo " CLEAN libconfig" + help: - @echo "possible targets are 'all' 'clean' 'help'" - @echo "'all' - builds $(LIBCONFIG_OBJ)" - @echo "'clean' - deletes $(LIBCONFIG_OBJ)" - @echo "'help' - outputs this message" + @echo "possible targets are 'all' 'clean' 'buildclean' 'help'" + @echo "'all' - builds $(LIBCONFIG_OBJ)" + @echo "'clean', 'buildclean' - deletes $(LIBCONFIG_OBJ)" + @echo "'help' - outputs this message" ##################################################################### diff --git a/3rdparty/mt19937ar/Makefile.in b/3rdparty/mt19937ar/Makefile.in index c48848c8d..5d8e19994 100644 --- a/3rdparty/mt19937ar/Makefile.in +++ b/3rdparty/mt19937ar/Makefile.in @@ -8,19 +8,22 @@ CC = @CC@ export CC ##################################################################### -.PHONY: all clean help +.PHONY: all clean buildclean help all: $(MT19937AR_OBJ) -clean: - @echo " CLEAN mt19937ar" +buildclean: + @echo " CLEAN mt19937ar (build temp files)" @rm -rf *.o +clean: buildclean + @echo " CLEAN mt19937ar" + help: - @echo "possible targets are 'all' 'clean' 'help'" - @echo "'all' - builds $(MT19937AR_OBJ)" - @echo "'clean' - deletes $(MT19937AR_OBJ)" - @echo "'help' - outputs this message" + @echo "possible targets are 'all' 'clean' 'buildclean' 'help'" + @echo "'all' - builds $(MT19937AR_OBJ)" + @echo "'clean', 'buildclean' - deletes $(MT19937AR_OBJ)" + @echo "'help' - outputs this message" ##################################################################### diff --git a/Makefile.in b/Makefile.in index 7dfb138f9..f41aac4c7 100644 --- a/Makefile.in +++ b/Makefile.in @@ -46,6 +46,8 @@ export CC import \ test \ clean \ + buildclean \ + distclean \ help all: $(ALL_DEPENDS) @@ -111,7 +113,7 @@ import: Makefile @if test ! -d conf/import ; then mkdir conf/import ; fi @for f in $$(ls conf/import-tmpl) ; do if test ! -e conf/import/$$f ; then cp conf/import-tmpl/$$f conf/import ; fi ; done -clean: $(MF_TARGETS) +clean buildclean: $(MF_TARGETS) @$(MAKE) -C src/common $@ @$(MAKE) -C 3rdparty/mt19937ar $@ @$(MAKE) -C 3rdparty/libconfig $@ @@ -140,7 +142,9 @@ help: Makefile @echo "'sql' - builds sql servers (targets 'common_sql' 'login_sql' 'char_sql'" @echo " 'map_sql' and 'import')" @echo "'test' - builds tests" - @echo "'clean' - cleans builds and objects" + @echo "'clean' - cleans executables and objects" + @echo "'buildclean' - cleans build temporary (object) files, without deleting the" + @echo " executables" @echo "'distclean' - cleans files generated by ./configure" @echo "'help' - outputs this message" diff --git a/src/char/Makefile.in b/src/char/Makefile.in index 02759b32e..4bb7f3fb8 100644 --- a/src/char/Makefile.in +++ b/src/char/Makefile.in @@ -34,21 +34,27 @@ CC = @CC@ export CC ##################################################################### -.PHONY: all sql char-server clean help +.PHONY: all sql char-server clean buildclean help all: sql sql: char-server -clean: +buildclean: + @echo " CLEAN char (build temp files)" + @rm -rf *.o obj_sql + +clean: buildclean @echo " CLEAN char" - @rm -rf *.o obj_sql ../../char-server@EXEEXT@ + @rm -rf ../../char-server@EXEEXT@ help: @echo "possible targets are 'char-server' 'all' 'clean' 'help'" @echo "'char-server' - char server" @echo "'all' - builds all above targets" @echo "'clean' - cleans builds and objects" + @echo "'buildclean' - cleans build temporary (object) files, without deleting the" + @echo " executables" @echo "'help' - outputs this message" ##################################################################### diff --git a/src/common/Makefile.in b/src/common/Makefile.in index 78f9cd0d1..53b7a472e 100644 --- a/src/common/Makefile.in +++ b/src/common/Makefile.in @@ -40,22 +40,25 @@ CC = @CC@ export CC ##################################################################### -.PHONY: all sql common common_sql common_mini clean help +.PHONY: all sql common common_sql common_mini clean buildclean help all: sql sql: $(SQL_DEPENDS) -clean: - @echo " CLEAN common" +buildclean: + @echo " CLEAN common (build temp files)" @rm -rf *.o obj_all obj_sql +clean: buildclean + @echo " CLEAN common" + help: @echo "possible targets are 'sql' 'all' 'clean' 'help'" - @echo "'sql' - builds object files used in sql servers" - @echo "'all' - builds all above targets" - @echo "'clean' - cleans builds and objects" - @echo "'help' - outputs this message" + @echo "'sql' - builds object files used in sql servers" + @echo "'all' - builds all above targets" + @echo "'clean', 'buildclean' - cleans builds and objects" + @echo "'help' - outputs this message" ##################################################################### diff --git a/src/login/Makefile.in b/src/login/Makefile.in index b6b70a495..a97d17f68 100644 --- a/src/login/Makefile.in +++ b/src/login/Makefile.in @@ -31,21 +31,27 @@ CC = @CC@ export CC ##################################################################### -.PHONY: all sql login-server clean help +.PHONY: all sql login-server clean buildclean help all: sql sql: login-server -clean: +buildclean: + @echo " CLEAN login (build temp files)" + @rm -rf *.o obj_sql + +clean: buildclean @echo " CLEAN login" - @rm -rf *.o obj_sql ../../login-server@EXEEXT@ + @rm -rf ../../login-server@EXEEXT@ help: @echo "possible targets are 'login-server' 'all' 'clean' 'help'" @echo "'login-server' - login server" @echo "'all' - builds all above targets" @echo "'clean' - cleans builds and objects" + @echo "'buildclean' - cleans build temporary (object) files, without deleting the" + @echo " executables" @echo "'help' - outputs this message" ##################################################################### diff --git a/src/map/Makefile.in b/src/map/Makefile.in index fb78d51a1..b516c61ca 100644 --- a/src/map/Makefile.in +++ b/src/map/Makefile.in @@ -47,21 +47,27 @@ CC = @CC@ export CC ##################################################################### -.PHONY: all sql map-server clean help +.PHONY: all sql map-server clean buildclean help all: sql sql: map-server -clean: +buildclean: + @echo " CLEAN map (build temp files)" + @rm -rf *.o obj_sql + +clean: buildclean @echo " CLEAN map" - @rm -rf *.o obj_sql ../../map-server@EXEEXT@ + @rm -rf ../../map-server@EXEEXT@ help: @echo "possible targets are 'map-server' 'all' 'clean' 'help'" @echo "'map-server' - map server" @echo "'all' - builds all above targets" @echo "'clean' - cleans builds and objects" + @echo "'buildclean' - cleans build temporary (object) files, without deleting the" + @echo " executables" @echo "'help' - outputs this message" ##################################################################### diff --git a/src/plugins/Makefile.in b/src/plugins/Makefile.in index ed573238d..53f44a0b4 100644 --- a/src/plugins/Makefile.in +++ b/src/plugins/Makefile.in @@ -44,8 +44,14 @@ clean: buildclean help: @echo "possible targets are $(PLUGINS:%='%') 'all' 'clean' 'help'" - @echo "'sample' - sample plugin" - @echo "'help' - outputs this message" + @echo "" + @echo "$(PLUGINS:%='%')" + @echo " - builds a specific plugin" + @echo "'all' - builds all above targets" + @echo "'clean' - cleans builds and objects" + @echo "'buildclean' - cleans build temporary (object) files, without deleting the" + @echo " compiled plugins" + @echo "'help' - outputs this message" ##################################################################### @@ -56,4 +62,4 @@ Makefile: Makefile.in ../../plugins/%@DLLEXT@: %.c $(ALL_H) $$(shell ls %/* 2>/dev/null) @echo " CC $<" - @$(CC) @DEFS@ @CFLAGS@ @CPPFLAGS@ @LDFLAGS@ @SOFLAGS@ -o $@ $< \ No newline at end of file + @$(CC) @DEFS@ @CFLAGS@ @CPPFLAGS@ @LDFLAGS@ @SOFLAGS@ -o $@ $< diff --git a/src/test/Makefile.in b/src/test/Makefile.in index cb99e7004..0c6d15c6b 100644 --- a/src/test/Makefile.in +++ b/src/test/Makefile.in @@ -24,13 +24,17 @@ CC = @CC@ export CC ##################################################################### -.PHONY: all test_spinlock +.PHONY: all test_spinlock clean buildclean all: test_spinlock Makefile -clean: +buildclean: + @echo " CLEAN test (build temp files)" + @rm -rf *.o obj + +clean: buildclean @echo " CLEAN test" - @rm -rf *.o obj ../../test_spinlock@EXEEXT@ + @rm -rf ../../test_spinlock@EXEEXT@ ##################################################################### diff --git a/src/tool/Makefile.in b/src/tool/Makefile.in index baf4a0327..ee448a16a 100644 --- a/src/tool/Makefile.in +++ b/src/tool/Makefile.in @@ -22,7 +22,7 @@ CC = @CC@ export CC ##################################################################### -.PHONY: all mapcache clean help +.PHONY: all mapcache clean buildclean help all: mapcache Makefile @@ -32,16 +32,22 @@ mapcache: ../../mapcache@EXEEXT@ @echo " LD $(notdir $@)" @$(CC) @LDFLAGS@ $(LIBCONFIG_INCLUDE) -o ../../mapcache@EXEEXT@ $(MAPCACHE_OBJ) $(COMMON_OBJ) $(LIBCONFIG_OBJ) @LIBS@ -clean: +buildclean: + @echo " CLEAN tool (build temp files)" + @rm -rf obj_all/*.o + +clean: buildclean @echo " CLEAN tool" - @rm -rf obj_all/*.o ../../mapcache@EXEEXT@ + @rm -rf ../../mapcache@EXEEXT@ help: @echo "possible targets are 'mapcache' 'all' 'clean' 'help'" - @echo "'mapcache' - mapcache generator" - @echo "'all' - builds all above targets" - @echo "'clean' - cleans builds and objects" - @echo "'help' - outputs this message" + @echo "'mapcache' - mapcache generator" + @echo "'all' - builds all above targets" + @echo "'clean' - cleans builds and objects" + @echo "'buildclean' - cleans build temporary (object) files, without deleting the" + @echo " executables" + @echo "'help' - outputs this message" ##################################################################### -- cgit v1.2.3-70-g09d2