[過去ログ] どんぐりシステムについて話しましょう ★40 (1002レス)
上下前次1-新
このスレッドは過去ログ倉庫に格納されています。
次スレ検索 歴削→次スレ 栞削→次スレ 過去ログメニュー
641(1): どんぐりキャノン ★ ハンター[Lv.257][木告] 05/21(火)15:52 ID:CAP_USER(44/65) AAS
>>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
上下前次1-新書関写板覧索設栞歴
あと 361 レスあります
スレ情報 赤レス抽出 画像レス抽出 歴の未読スレ AAサムネイル
ぬこの手 ぬこTOP 1.461s*