Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial implementation of Soul Ascetic #8162

Open
wants to merge 23 commits into
base: master
Choose a base branch
from

Conversation

Lemongrass3110
Copy link
Member

@Lemongrass3110 Lemongrass3110 added component:database A fault that lies within the database of rAthena component:core A fault that lies within the main framework of rAthena mode:renewal A fault that exists within the renewal mode status:code-review Pull Request that requires reviewing from other developers before being pushed to master type:bug Issue that is a bug within rAthena labels Mar 11, 2024
src/map/skill.cpp Outdated Show resolved Hide resolved
src/map/skill.cpp Outdated Show resolved Hide resolved
src/map/skill.cpp Outdated Show resolved Hide resolved
if (sd == NULL || sd->status.party_id == 0 || (flag & 1)) {

// Animations don't play when outside visible range
if (check_distance_bl(src, bl, AREA_SIZE))
clif_skill_nodamage(bl, bl, skill_id, skill_lv, 1);

if( skill_id == SOA_SOUL_OF_HEAVEN_AND_EARTH ){
if( src != bl && tsc && tsc->getSCE(SC_TOTEM_OF_TUTELARY) ){
status_heal(bl, 0, 0, 3 * skill_lv, 0);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the special part about Totem of Tutelary that heals AP:
Using this skill while the user is under the effect of Totem of Tutelary also recovers AP to the party members.

But where is the normal healing part:
Calls the divine power from the heaven upon the earth, fully recovers SP to all party members within 23 x 23 cells around the user.

For me this implementation looks wrong, as it checks the target sc instead of the source sc.

https://divine-pride.net/database/skill/5432

src/map/skill.cpp Outdated Show resolved Hide resolved
src/map/skill.cpp Outdated Show resolved Hide resolved
src/map/skill.cpp Outdated Show resolved Hide resolved
int hp = 500;

hp += 500 * sg->skill_lv;
hp += 50 * pc_checkskill( tsd, SOA_TALISMAN_MASTERY ) * sg->skill_lv;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
hp += 50 * pc_checkskill( tsd, SOA_TALISMAN_MASTERY ) * sg->skill_lv;
hp += 50 * pc_checkskill( BL_CAST( BL_PC, ss ), SOA_TALISMAN_MASTERY ) * sg->skill_lv;

According to divine-pride it should depend on the users level of talisman mastery and not the targets level of talisman mastery:

Recovers additional amount depends on level of Talisman Mastery user learned, user's base level and CRT.

https://divine-pride.net/database/skill/5422

src/map/skill.cpp Outdated Show resolved Hide resolved
Size: 3
- Level: 5
Size: 4
Interval: 1000
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Interval: 1000
Interval: 500

According to @datawulf


hp += 500 * sg->skill_lv;
hp += 50 * pc_checkskill( tsd, SOA_TALISMAN_MASTERY ) * sg->skill_lv;
hp += 50 * status_get_crt( ss ) * sg->skill_lv;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
hp += 50 * status_get_crt( ss ) * sg->skill_lv;
hp += 5 * status_get_crt( ss );

According to @datawulf


sp += 50 * sg->skill_lv;
sp += 5 * pc_checkskill( BL_CAST( BL_PC, ss ), SOA_TALISMAN_MASTERY ) * sg->skill_lv;
sp += 5 * tstatus->crt * sg->skill_lv;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
sp += 5 * tstatus->crt * sg->skill_lv;
sp += 5 * tstatus->crt;

According to @datawulf

Comment on lines +16801 to +16802
sp *= 100 + status_get_lv( ss );
sp /= 150;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
sp *= 100 + status_get_lv( ss );
sp /= 150;
sp *= status_get_lv( ss ) / 100;

According to @datawulf

if (sd == NULL || sd->status.party_id == 0 || (flag & 1)) {

// Animations don't play when outside visible range
if (check_distance_bl(src, bl, AREA_SIZE))
clif_skill_nodamage(bl, bl, skill_id, skill_lv, 1);

if( skill_id == SOA_SOUL_OF_HEAVEN_AND_EARTH ){
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if( skill_id == SOA_SOUL_OF_HEAVEN_AND_EARTH ){
if( skill_id == SOA_SOUL_OF_HEAVEN_AND_EARTH ){
status_percent_heal( bl, 0, 100 );

Missing SP healing of target.

if (sd == NULL || sd->status.party_id == 0 || (flag & 1)) {

// Animations don't play when outside visible range
if (check_distance_bl(src, bl, AREA_SIZE))
clif_skill_nodamage(bl, bl, skill_id, skill_lv, 1);

if( skill_id == SOA_SOUL_OF_HEAVEN_AND_EARTH ){
if( src != bl && tsc && tsc->getSCE(SC_TOTEM_OF_TUTELARY) ){
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if( src != bl && tsc && tsc->getSCE(SC_TOTEM_OF_TUTELARY) ){
if( src != bl && sc && sc->getSCE(SC_TOTEM_OF_TUTELARY) ){

Using this skill while the USER is under the effect...

@@ -7129,6 +7147,21 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, uint
status_change_end(src, SC_INTENSIVE_AIM_COUNT);
break;

case SOA_TALISMAN_OF_BLUE_DRAGON:
clif_skill_nodamage(src,bl,skill_id,skill_lv,1);
skill_attack(BF_MAGIC,src,src,bl,skill_id,skill_lv,tick,flag);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
skill_attack(BF_MAGIC,src,src,bl,skill_id,skill_lv,tick,flag);
skill_attack(skill_get_type(skill_id), src, src, bl, skill_id, skill_lv, tick, flag);

Time: 270000
- Level: 5
Time: 300000
Duration2:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When is Duration2 used?

DurationLookup: SOA_TALISMAN_OF_PROTECTION
Flags:
BlEffect: true
DisplayPc: true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The SC already has these conditions

// If the caster is offline, dead, on another map or
// if the target is not a player or is in another party
// End the status change

but maybe we could also add the flag

	RemoveOnMapWarp       - Removed when warping to another map.

?

I guess the NoSave flag should also be defined, but that's just a guess

	NoSave                - Won't be saved when player logs out.

Patk: true
Flags:
BlEffect: true
DisplayPc: true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://www.divine-pride.net/database/skill/5419

Can only be used on target who equips weapon.

How about using the flags

	RemoveOnUnequipWeapon - Removed when unequipping a weapon.
	RequireWeapon         - Status requires a weapon to be equipped.

Smatk: true
Flags:
BlEffect: true
DisplayPc: true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://www.divine-pride.net/database/skill/5420

Can only be used on target who equips weapon.

How about using the flags

	RemoveOnUnequipWeapon - Removed when unequipping a weapon.
	RequireWeapon         - Status requires a weapon to be equipped.

All: true
Flags:
BlEffect: true
DisplayPc: true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://www.divine-pride.net/database/skill/5423

Can only be used on target who equips weapon.

How about using the flags

	RemoveOnUnequipWeapon - Removed when unequipping a weapon.
	RequireWeapon         - Status requires a weapon to be equipped.

int bonus = sc->getSCE(SC_TALISMAN_OF_FIVE_ELEMENTS)->val2;

for( const auto &element : elements ){
sd->indexed_bonus.magic_atk_ele[element] += bonus;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://www.divine-pride.net/database/skill/5423

Attaches the talisman of five elements to self or 1 party member to increases physical and magical damage against water, wind, earth, fire and neutral property enemies.

For me it should be

Suggested change
sd->indexed_bonus.magic_atk_ele[element] += bonus;
sd->indexed_bonus.magic_addele[element] += bonus;

magic_addele: +x% magical damage against unit element e
while magic_atk_ele increases damage of e element magic of caster by x%

case SOA_TALISMAN_OF_SOUL_STEALING:
skill_attack(skill_get_type(skill_id), src, src, bl, skill_id, skill_lv, tick, flag);
if( bl->type != BL_SKILL ){
int64 sp = 100 * skill_lv + status_get_lv(src);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be easier to just calculate this in the function call below?

name.resize(SKILL_DESC_LENGTH);
memcpy(skill->desc, name.c_str(), sizeof(skill->desc));
desc.resize(SKILL_DESC_LENGTH);
memcpy(skill->desc, desc.c_str(), sizeof(skill->desc));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we change the storage for skill names and descriptions to string to get rid of scary mem* manipulations?


int hp = skill_calc_heal( &ssd->bl, bl, SOA_TALISMAN_OF_PROTECTION, sce->val1, true );

status_heal( bl, hp, 0, 0, 2 );
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Heal effect (not 0 HP) is also displayed on official server when player hp is hpmax.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:core A fault that lies within the main framework of rAthena component:database A fault that lies within the database of rAthena mode:renewal A fault that exists within the renewal mode status:code-review Pull Request that requires reviewing from other developers before being pushed to master type:bug Issue that is a bug within rAthena
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants