deitalk
-
Posts
14 -
Joined
-
Last visited
Content Type
Profiles
Forums
Downloads
Jobs Available
Server Database
Third-Party Services
Top Guides
Store
Crowdfunding
Posts posted by deitalk
-
-
Is there any available tutorial for GRF's file table encrypt? I'd like to disable the merging option for my GRF file.
-
Apparently at some point someone decided that it wouldn't exist negative damage on RO anymore and then we lost attr_recover option (on both re and pre-re)... I'm still searching where on src it caps all forms of damage to positive
-
Actually I'm running pre-re setup, so yeah, I'd appreciate that. I've made some tests and couldn't even force directly ratio (therefore damage) to assume negative values. Even when I put damage = -ratio; it seems to revert negative to positive (ok) and when it tries to revert positives I get 0/1 damage
-
The conf switch must make any x > 100% protection (ratio < 0 on battle.c) to heal the target instead of miss, but the ratio isn't receiving negative values
-
BTW, pasana should only reduce 75% from total fire damage, I think... Evil Druid should reduce 125% from shadow/poison...
-
If I'm wearing Evil Druid and get hit by poison/shadow, it causes miss or 1 total damage. It should heal.
-
battle.c
lines: 420, 576
-
I'm running the newest rathena on pre-re and negative values for elemental damage are being read as 1 or miss even with attribute_recover set to 1
battle.conf:
Spoilerattribute_recover: yes
ratio on battle.cpp should determine if damage is a positive or negative value
battle.cpp:
Spoilerint64 battle_attr_fix(struct block_list *src, struct block_list *target, int64 damage,int atk_elem,int def_type, int def_lv)
{
struct status_change *sc = NULL, *tsc = NULL;
int ratio;if (src) sc = status_get_sc(src);
if (target) tsc = status_get_sc(target);if (!CHK_ELEMENT(atk_elem))
atk_elem = rnd()%ELE_ALL;if (!CHK_ELEMENT(def_type) || !CHK_ELEMENT_LEVEL(def_lv)) {
ShowError("battle_attr_fix: unknown attribute type: atk=%d def_type=%d def_lv=%d\n",atk_elem,def_type,def_lv);
return damage;
}ratio = attr_fix_table[def_lv-1][atk_elem][def_type];
battle.cpp:
Spoilerif (battle_config.attr_recover == 0 && ratio < 0)
ratio = 0;#ifdef RENEWAL
//In renewal, reductions are always rounded down so damage can never reach 0 unless ratio is 0
damage = damage - (int64)((damage * (100 - ratio)) / 100);
#else
damage = (int64)((damage*ratio)/100);
#endif//Damage can be negative, see battle_config.attr_recover
return damage;status.cpp:
Spoilerwhile (fgets(line, sizeof(line), fp)) {
int lv, i, j;
if (line[0] == '/' && line[1] == '/')
continue;lv = atoi(line);
if (!CHK_ELEMENT_LEVEL(lv))
continue;for (i = 0; i < ELE_ALL;) {
char *p;
if (!fgets(line, sizeof(line), fp))
break;
if (line[0]=='/' && line[1]=='/')
continue;for (j = 0, p = line; j < ELE_ALL && p; j++) {
while (*p == 32) //skipping space (32=' ')
p++;
//TODO seem unsafe to continue without check
attr_fix_table[lv-1][j] = atoi(p);
p = strchr(p,',');
if(p)
*p++=0;
}i++;
}
entries++;
}What should I change in order to read attr_fix_table/ratio/damage negative values and make them heal target's HP?
-
Hi there, I'd like to know how to modify left hand basic attack damage while dual wielding in order to reduce damage instead of ignore racial/elemental/defense reductions.
-
I'd like to know a way to check if a player dealt damage (any positive amount, any target) and use it as a condition to cast certain buff on skill.c. The check would reset if the player warps to another map, dies or receives dispell.
-
Hi, I'd like to know if is there a way to make deal damage (any positive value) as a condition to use Comfort and Warm of the Sun/Moon/Stars skills instead of being in a certain map memorized bye Feeling skill. Plus, I'd like it to make damage dealing flag reset after warping or being sucessfully dispelled. Could anyone help me?
-
short_weapon_damage_return behavior on safety wall and shield auto guard
in Source Support
Posted
Hey, I know it is an offical behavior (reflecting damage even if the attack misses on these skills), but I'd like to know how to change items which apply short_weapon_damage_return in order to not apply damage reflect upon ATK_MISS anymore.
battle.cpp line 6891:
if ( (skill_get_inf2(skill_id)&INF2_TRAP || !status_reflect) && sd && sd->bonus.short_weapon_damage_return ) {
rdamage += damage * sd->bonus.short_weapon_damage_return / 100;
rdamage = i64max(rdamage,1);
Can anyone help me? Thanks.