>>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■ このスレッドは過去ログ倉庫に格納されています
ニュース
- 立川の小学校襲撃の46歳男「知人の娘をいじめている子と話すために行った」と供述 ★2 [蚤の市★]
- 日本マクドナルド、レジ袋の有料化終了へ… 三崎優太氏が称賛 「誰が得するのか謎なくらい面倒くさい制度だよな」 [冬月記者★]
- 【若者のYouTube離れ】進行中…増え続ける「Z世代」がYouTubeのかわりにいま最も熱中するアプリ [ぐれ★]
- 対ドイツ戦勝記念日に硫黄島画像 トランプ氏が投稿、歴史混同か [蚤の市★]
- 政府の借金1323兆円に 24年度末、9年連続で最大 ★4 [首都圏の虎★]
- なぜ若者は結婚しないのか?「金がないから」説を裏付ける明確な根拠 [首都圏の虎★]
- 【朗報】元横浜乙坂、マリナーズと契約!藤浪の同僚になる
- 【動画】すまんこの事故ってどっちがどれぐらい悪いんだ? [597533159]
- 【悲報】不倫報道の永野芽郁さん、心身ともに疲弊……「眠れないし食事も喉に通らない」と 落ち込む……… [839150984]
- 女性「レジ並ぶのつらいなぁ…先頭の人譲ってくれたらいいのに…」
- なろう「え!?社内システムワンオペしてる私を解雇ですか!?」 [159091185]
- 【画像】Pan Pianoさん、突如現れたライバルに再生数で10倍以上差をつけられ咽び泣くWWWWWWWWWWW [732289945]