>>603 >>638
This is the actual code. Would you like to check it?
elementalScaling :: Float
elementalScaling = 0.05
elementalEffectiveness :: Maybe (Element Int) -> Maybe (Element Int) -> Float
-- Main elemental cycle: Lightning > Air > Earth > Water > Fire > Ice > Lightning
elementalEffectiveness (Just (Lightning !potency1)) (Just (Air !potency2)) = 1.2 + elementalScaling * fromIntegral (potency1 - potency2)
elementalEffectiveness (Just (Air !potency1)) (Just (Earth !potency2)) = 1.2 + elementalScaling * fromIntegral (potency1 - potency2)
elementalEffectiveness (Just (Earth !potency1)) (Just (Water !potency2)) = 1.2 + elementalScaling * fromIntegral (potency1 - potency2)
elementalEffectiveness (Just (Water !potency1)) (Just (Fire !potency2)) = 1.2 + elementalScaling * fromIntegral (potency1 - potency2)
elementalEffectiveness (Just (Fire !potency1)) (Just (Ice !potency2)) = 1.2 + elementalScaling * fromIntegral (potency1 - potency2)
elementalEffectiveness (Just (Ice !potency1)) (Just (Lightning !potency2)) = 1.2 + elementalScaling * fromIntegral (potency1 - potency2)
-- Reverse of the main elemental cycle
elementalEffectiveness (Just (Air !potency1)) (Just (Lightning !potency2)) = 0.8 - elementalScaling * fromIntegral (potency1 - potency2)
elementalEffectiveness (Just (Earth !potency1)) (Just (Air !potency2)) = 0.8 - elementalScaling * fromIntegral (potency1 - potency2)
elementalEffectiveness (Just (Water !potency1)) (Just (Earth !potency2)) = 0.8 - elementalScaling * fromIntegral (potency1 - potency2)
elementalEffectiveness (Just (Fire !potency1)) (Just (Water !potency2)) = 0.8 - elementalScaling * fromIntegral (potency1 - potency2)
elementalEffectiveness (Just (Ice !potency1)) (Just (Fire !potency2)) = 0.8 - elementalScaling * fromIntegral (potency1 - potency2)
elementalEffectiveness (Just (Lightning !potency1)) (Just (Ice !potency2)) = 0.8 - elementalScaling * fromIntegral (potency1 - potency2)
-- Main dark/light/normal cycle: Light > Dark > Normal > Light
elementalEffectiveness (Just (Light potency1)) (Just (Dark potency2)) = 1.2 + elementalScaling * fromIntegral (potency1 - potency2)
elementalEffectiveness (Just (Dark potency1)) Nothing = 1.2 + elementalScaling * fromIntegral (potency1 - 0)
elementalEffectiveness Nothing (Just (Light potency2)) = 1.2 + elementalScaling * fromIntegral (0 - potency2)
-- Reverse of the dark/light/normal cycle
elementalEffectiveness (Just (Dark potency1)) (Just (Light potency2)) = 0.8 - elementalScaling * fromIntegral (potency1 - potency2)
elementalEffectiveness Nothing (Just (Dark potency2)) = 0.8 - elementalScaling * fromIntegral (0 - potency2)
elementalEffectiveness (Just (Light potency1)) Nothing = 0.8 - elementalScaling * fromIntegral (potency1 - 0)
-- Neutral effectiveness for other combinations or lack of elements
elementalEffectiveness _ _ = 1.0
探検
どんぐりシステムについて話しましょう ★40
■ このスレッドは過去ログ倉庫に格納されています
641どんぐりキャノン ★ ハンター[Lv.257][木告]
2024/05/21(火) 15:52:27.22ID:CAP_USER■ このスレッドは過去ログ倉庫に格納されています
ニュース
- 日本生命、フジテレビCMを見直し トラブルへの社員関与報道で 19日からACジャパンに差し替え [ひかり★]
- 佐々木朗希 ドジャースと契約合意 大谷・山本と同僚に [おっさん友の会★]
- 「女は格下」「子どもを産んで当たり前」 地方の若い女性を悩ます“男尊女卑”の因習 [ぐれ★]
- 「女は格下」「子どもを産んで当たり前」 地方の若い女性を悩ます“男尊女卑”の因習 ★2 [ぐれ★]
- 中居正広の被害女性X子さんの「9000万円も受け取っていない」新証言に弁護士は"守秘義務違反にあたりうる"と指摘 ★2 [Ailuropoda melanoleuca★]
- フジテレビ社長 深刻事案もすぐに中居に調査せず「多くの人間が知る」 しばらく後に中居から「女性と問題」と連絡 [阿弥陀ヶ峰★]
- 🥺🏰🕌🏡ぷゆゆ王国🏢🏫🕍
- 【悲報】日本生命、フジテレビCMを見直し 記者会見がクソすぎたため 19日からACジャパンに差し替え [747976479]
- ヤマト運輸「スキマバイトアプリで集まったスタッフはプロ意識に欠ける」 [819669825]
- 佐々木朗希ドジャースwwwwwwwwwwwwwwwwww
- 公務員って最低賃金じゃダメなのか?最低賃金でもいいって人にやってほしいんだが [893219626]
- 俺と宝鐘マリンが激しく愛し合う愛のお🏡💕💕💕💕