Parcourir la source

Fix GC_POISONREACT missing skill bonus (#5805)

* Fixes #5804.
* Poison React now has a chance to attack twice, with same rate of Double Attack, when the character has learned Double Attack.
* Number of hit counters is changed to 1/1/2/2/3/3/4/4/5/5.
Thanks to @eppc0330!
eppc0330 il y a 4 ans
Parent
commit
8399a0371c
2 fichiers modifiés avec 14 ajouts et 0 suppressions
  1. 10 0
      src/map/battle.cpp
  2. 4 0
      src/map/status.cpp

+ 10 - 0
src/map/battle.cpp

@@ -3755,6 +3755,16 @@ static void battle_calc_multi_attack(struct Damage* wd, struct block_list *src,s
 			if( tsc && tsc->data[SC_JYUMONJIKIRI] )
 				wd->div_ = wd->div_ * -1;// needs more info
 			break;
+#ifdef RENEWAL
+		case AS_POISONREACT:
+			skill_lv = pc_checkskill(sd, TF_DOUBLE);
+			if (skill_lv > 0) {
+				if(rnd()%100 < (7 * skill_lv)) {
+					wd->div_++;
+				}
+			}
+		break;
+#endif
 	}
 }
 

+ 4 - 0
src/map/status.cpp

@@ -10297,7 +10297,11 @@ int status_change_start(struct block_list* src, struct block_list* bl,enum sc_ty
 			}
 			break;
 		case SC_POISONREACT:
+#ifdef RENEWAL
+			val2=(val1 - ((val1-1) % 1 - 1)) / 2;
+#else
 			val2=(val1+1)/2 + val1/10; // Number of counters [Skotlex]
+#endif
 			val3=50; // + 5*val1; // Chance to counter. [Skotlex]
 			break;
 		case SC_MAGICROD: