• 0
Radian

SG skills need help

Question

Solar Heat / Lunar Heat / Stellar Heat doesn't work on players. how can i change it and make it deal 50% damage only on DemiHumans.

Share this post


Link to post
Share on other sites

5 answers to this question

Recommended Posts

  • 0
			if(tstatus->race == RC_DEMIHUMAN)
				skillratio = 50;
			else;
				skillratio = 100; 
			break;

something like that in battle.c 

might be 2 == , or use +=.... your call

 

and 

 

it should if they are your enemy :

428,0x86,    ,  0, 1, 100,enemy, 0x000	//SG_SUN_WARM

but if you cant still let me know 

Share this post


Link to post
Share on other sites
  • 0
6 hours ago, Naruto said:
			if(tstatus->race == RC_DEMIHUMAN)
				skillratio = 50;
			else;
				skillratio = 100; 
			break;

something like that in battle.c 

might be 2 == , or use +=.... your call

 

and 

 

it should if they are your enemy :

428,0x86,    ,  0, 1, 100,enemy, 0x000	//SG_SUN_WARM

but if you cant still let me know 

I dont understand the 1st part. can you explain where to add it? for the skill_db im not sure if that will work but thanks for the suggestion.

Share this post


Link to post
Share on other sites
  • 0
1 hour ago, Radian said:

I dont understand the 1st part. can you explain where to add it? for the skill_db im not sure if that will work but thanks for the suggestion.

wow im really sorry

 

your gonna have to read this thread , dont bother changing the formula for sg skills....  

https://herc.ws/board/topic/17265-simple-auras-reusable-and-clean/?tab=comments#comment-92402

 

my bad...

 

you could modify it but ill look through it later for you i just remembered that it was horribly written 

 

Share this post


Link to post
Share on other sites
  • 0

Heya,

These are ground unit skills. You'll want to skip the BL_PC check and then adjust the skill ratios to battle.cpp:

diff --git a/src/map/battle.cpp b/src/map/battle.cpp
index de8167f4a..904a672d8 100644
--- a/src/map/battle.cpp
+++ b/src/map/battle.cpp
@@ -4354,6 +4354,13 @@ static int battle_calc_attack_skill_ratio(struct Damage* wd, struct block_list *
 			if (sd && pc_checkskill(sd, SU_SPIRITOFLIFE))
 				skillratio += skillratio * status_get_hp(src) / status_get_max_hp(src);
 			break;
+		case SG_SUN_WARM:
+		case SG_MOON_WARM:
+		case SG_STAR_WARM:
+			if (tsd) {
+				skillratio += -50;
+			}
+			break;
 	}
 	return skillratio;
 }
diff --git a/src/map/skill.cpp b/src/map/skill.cpp
index 3b7b4ba86..7656a247f 100755
--- a/src/map/skill.cpp
+++ b/src/map/skill.cpp
@@ -13795,7 +13795,7 @@ int skill_unit_onplace_timer(struct skill_unit *unit, struct block_list *bl, t_t
 					do {
 						if( bl->type == BL_PC )
 							status_zap(bl, 0, 15); // sp damage to players
-						else // mobs
+						
 						if( status_charge(ss, 0, 2) ) { // costs 2 SP per hit
 							if( !skill_attack(BF_WEAPON,ss,&unit->bl,bl,sg->skill_id,sg->skill_lv,tick+(t_tick)count*sg->interval,0) )
 								status_charge(ss, 0, 8); //costs additional 8 SP if miss

 

  • Love 1
  • MVP 1

Share this post


Link to post
Share on other sites
  • 0
3 minutes ago, Tokei said:

Heya,

These are ground unit skills. You'll want to skip the BL_PC check and then adjust the skill ratios to battle.cpp:

diff --git a/src/map/battle.cpp b/src/map/battle.cpp
index de8167f4a..904a672d8 100644
--- a/src/map/battle.cpp
+++ b/src/map/battle.cpp
@@ -4354,6 +4354,13 @@ static int battle_calc_attack_skill_ratio(struct Damage* wd, struct block_list *
 			if (sd && pc_checkskill(sd, SU_SPIRITOFLIFE))
 				skillratio += skillratio * status_get_hp(src) / status_get_max_hp(src);
 			break;
+		case SG_SUN_WARM:
+		case SG_MOON_WARM:
+		case SG_STAR_WARM:
+			if (tsd) {
+				skillratio += -50;
+			}
+			break;
 	}
 	return skillratio;
 }
diff --git a/src/map/skill.cpp b/src/map/skill.cpp
index 3b7b4ba86..7656a247f 100755
--- a/src/map/skill.cpp
+++ b/src/map/skill.cpp
@@ -13795,7 +13795,7 @@ int skill_unit_onplace_timer(struct skill_unit *unit, struct block_list *bl, t_t
 					do {
 						if( bl->type == BL_PC )
 							status_zap(bl, 0, 15); // sp damage to players
-						else // mobs
+						
 						if( status_charge(ss, 0, 2) ) { // costs 2 SP per hit
 							if( !skill_attack(BF_WEAPON,ss,&unit->bl,bl,sg->skill_id,sg->skill_lv,tick+(t_tick)count*sg->interval,0) )
 								status_charge(ss, 0, 8); //costs additional 8 SP if miss

 

Thanks @Tokei !! I'll try this and see what happened.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...