>>738
To calculate the adjusted damage \( D \), start with this formula:
\[ D = \max(0, \left\lfloor (F - A) \times E \right\rfloor ) \]
Where:
- \( D \) is the adjusted damage.
- \( F \) is the final base damage dealt (including possible critical hits).
- \( A \) is the final defense of the opponent (including possible critical defense).
- \( E \) is the elemental effectiveness factor, which adjusts the damage based on the interaction between attacker’s and defender’s elements.
The elemental effectiveness \( E \) depends on the elements involved and their respective potencies. If one element is strong against another, the effectiveness factor increases; if one element is weak against another, the effectiveness factor decreases. Here’s how it is calculated:
For element interactions:
1. If the attacker’s element is strong against the defender’s element:
\[ E = 1.2 + 0.05 \times (p_1 - p_2) \]
Where \( p_1 \) is the potency of the attacker’s element, and \( p_2 \) is the potency of the defender’s element.
2. If the attacker’s element is weak against the defender’s element:
\[ E = 0.8 - 0.05 \times (p_1 - p_2) \]
3. Otherwise (if there is no specific strength or weakness between the elements or no elements are involved):
\[ E = 1.0 \]
Here are specific examples of element interactions:
- Fire vs Ice: \( E = 1.2 + 0.05 \times (p_1 - p_2) \)
- Ice vs Fire: \( E = 0.8 - 0.05 \times (p_1 - p_2) \)
- Fire vs Water: \( E = 0.8 - 0.05 \times (p_1 - p_2) \)
- Water vs Fire: \( E = 1.2 + 0.05 \times (p_1 - p_2) \)
- Water vs Earth: \( E = 0.8 - 0.05 \times (p_1 - p_2) \)
- Earth vs Water: \( E = 1.2 + 0.05 \times (p_1 - p_2) \)
- Earth vs Air: \( E = 0.8 - 0.05 \times (p_1 - p_2) \)
- Air vs Earth: \( E = 1.2 + 0.05 \times (p_1 - p_2) \)
- Air vs Lightning: \( E = 0.8 - 0.05 \times (p_1 - p_2) \)
- Lightning vs Air: \( E = 1.2 + 0.05 \times (p_1 - p_2) \)
- Lightning vs Water: \( E = 1.2 + 0.05 \times (p_1 - p_2) \)
- Water vs Lightning: \( E = 0.8 - 0.05 \times (p_1 - p_2) \)
- Ice vs Lightning: \( E = 0.8 - 0.05 \times (p_1 - p_2) \)
- Lightning vs Ice: \( E = 1.2 + 0.05 \times (p_1 - p_2) \)
- Light vs Dark: \( E = 1.2 + 0.05 \times (p_1 - p_2) \)
- Dark vs Light: \( E = 0.8 - 0.05 \times (p_1 - p_2) \)
- If the attacker's element is Dark and the defender has no elemental defense:
\[ E = 1.2 + 0.05 \times (p_1 - 0) \]
In simpler terms, the elemental effectiveness adjusts the damage based on the interaction of elements. Elements have strengths and weaknesses against each other, and this is reflected in the calculation to either amplify or reduce the damage done in battle.
Please let me know if there is an error in my calculation or element/resistance loop, and I will fix it.
どんぐりシステムについて話しましょう ★39
■ このスレッドは過去ログ倉庫に格納されています
751どんぐりキャノン ★ 警備員[Lv.4(前13)][芽警]
2024/05/18(土) 10:27:16.15ID:CAP_USER■ このスレッドは過去ログ倉庫に格納されています
ニュース
- 「米価このまま維持されてしかるべきだ」佐賀県知事、稲作農家の経営踏まえ言及 [蚤の市★]
- 駅前の一等地にデータセンター計画、「人が入れない施設が建っていいのか」と反対の声相次ぐ [蚤の市★]
- 【ドジャース3連敗】今季2度目の3連敗...大谷翔平は無安打、山本由伸5回3失点で2敗目 パイレーツ・スキーンズ7回途中無失点9K [鉄チーズ烏★]
- 木村拓哉が「ドッグウェアは人間のエゴ」発言、上沼恵美子が反論し論争勃発 獣医師は「必要性は犬それぞれ」 [ネギうどん★]
- 万博会場内から救急搬送された来場者が死亡 万博協会「適切な処置」 [少考さん★]
- 日本の未来の姿!?1人当たりGDP世界5位→82位へ転落した「元・先進国」の静かなる衰退を現地ルポ (泉 秀一氏) [少考さん★]
- 【悲報】財務省「減税したいってことは、年金も医療も生活保護も警察も道路も無くなるってことですよね?それでいいんですね [159091185]
- マジでお前らが大阪万博をそこまで叩く理由何?やっぱ税金使われてるのはムカつくの? [434776867]
- 北海道の旭川で美人女子高生16歳が行方不明! 名探偵ケンモくんの出番だぞ! [205023192]
- ▶土曜お昼の白上フブキすこすこスレ
- 【悲報】財務省「減税したいってことは、教育も医療も生活保護も警察も道路も必要ないってことですよね?それでいいんですね [257926174]
- 【朗報】大谷翔平、父親になった途端に完全に終わる…… [748563222]