ディスガイア風SRPGは、超インフレ育成と周回要素が特徴です。
これらの要素を実装すれば、やり込み要素が増えます。
この記事では、実装方法を詳しく解説します。
✨ この記事でわかること
- 超インフレ育成システムの実装
- 持ち上げ投げシステムの実装
- 連携攻撃システムの実装
- 周回要素の実装
- 実装例とコード

超インフレ育成は、数値の上限を高く設定することが大切です。最初から上限を決めておきましょう。
Unity入門の森を見る 初心者歓迎!動画×プロジェクト一式で本格ゲーム制作を学べる
あなたのオリジナルゲーム、今年こそ完成させませんか?
RPG・アクション・ホラー…Unityで本格ゲームを作りたい人のための学習サイトです。
実際に完成するゲームを題材に、
ソースコード・素材・プロジェクト一式をすべて公開。
仕事や学校の合間の1〜2時間でも、
「写経→改造」で自分のゲームまで作りきれる環境です。
超インフレ育成システムの実装

超インフレ育成は、数値が大きく成長します。
実装方法を紹介します。
レベル上限の拡張
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
using UnityEngine; public class DisgaeaStyleLeveling : MonoBehaviour { public int maxLevel = 9999; // 上限を高く設定 public int reincarnationLevel = 100; // 転生レベル public void LevelUp(Unit unit) { if (unit.level >= maxLevel) { Debug.Log("レベル上限に達しました"); return; } unit.level++; // 成長率に基づいてステータス上昇 int hpGrowth = Mathf.RoundToInt(unit.stats.maxHP * 0.1f); int attackGrowth = Mathf.RoundToInt(unit.stats.attack * 0.08f); int defenseGrowth = Mathf.RoundToInt(unit.stats.defense * 0.06f); unit.stats.maxHP += hpGrowth; unit.stats.attack += attackGrowth; unit.stats.defense += defenseGrowth; unit.stats.currentHP = unit.stats.maxHP; } public void Reincarnate(Unit unit) { if (unit.level < reincarnationLevel) { Debug.Log("転生レベルに達していません"); return; } // レベルを1に戻す unit.level = 1; // 成長率を向上 unit.stats.growthRate += 0.01f; // 1%向上 // ステータスを再計算 RecalculateStats(unit); } void RecalculateStats(Unit unit) { // 転生回数に応じてステータスを再計算 // 実装は省略 } } |
このコードで、超インフレ育成が実装できます。
レベル上限を高く設定し、転生システムで成長率を向上させます。
ステータス上限の拡張
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
[System.Serializable] public class DisgaeaStyleStats { public int maxHP = 9999999; public int currentHP = 9999999; public int attack = 999999; public int defense = 999999; public int speed = 99999; public void AddStatBonus(int hp, int attack, int defense, int speed) { this.maxHP = Mathf.Min(this.maxHP + hp, 9999999); this.attack = Mathf.Min(this.attack + attack, 999999); this.defense = Mathf.Min(this.defense + defense, 999999); this.speed = Mathf.Min(this.speed + speed, 99999); } } |
ステータスの上限を高く設定します。
これにより、超インフレ育成が可能になります。
Unity入門の森を見る 初心者歓迎!動画×プロジェクト一式で本格ゲーム制作を学べる
持ち上げ投げシステムの実装

持ち上げ投げは、ユニットを運ぶシステムです。
実装方法を紹介します。
持ち上げシステムの実装
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
using UnityEngine; public class LiftThrowSystem : MonoBehaviour { public void LiftUnit(Unit lifter, Unit target) { // 持ち上げ可能かチェック if (!CanLift(lifter, target)) { Debug.Log("持ち上げできません"); return; } // 持ち上げる target.isLifted = true; target.liftedBy = lifter; target.transform.SetParent(lifter.transform); target.transform.localPosition = Vector3.up * 2f; } bool CanLift(Unit lifter, Unit target) { // 距離チェック int distance = Mathf.Abs(lifter.gridX - target.gridX) + Mathf.Abs(lifter.gridY - target.gridY); if (distance != 1) { return false; } // 既に持ち上げられているかチェック if (target.isLifted) { return false; } // 重量チェック if (target.weight > lifter.liftCapacity) { return false; } return true; } public void ThrowUnit(Unit thrower, Vector2Int targetPosition) { if (thrower.liftedUnit == null) { Debug.Log("持ち上げているユニットがありません"); return; } Unit thrownUnit = thrower.liftedUnit; // 投げる距離をチェック int throwDistance = Mathf.Abs(thrower.gridX - targetPosition.x) + Mathf.Abs(thrower.gridY - targetPosition.y); if (throwDistance > thrower.throwRange) { Debug.Log("投げる距離が足りません"); return; } // 投げる thrownUnit.isLifted = false; thrownUnit.liftedBy = null; thrownUnit.transform.SetParent(null); thrownUnit.SetPosition(targetPosition.x, targetPosition.y, gridMap); thrower.liftedUnit = null; } } |
このコードで、持ち上げ投げシステムが実装できます。
ユニットを持ち上げて、別の位置に投げることができます。

持ち上げ投げは、戦略性を大きく高めます。ユニットを素早く移動させることができます。
Unity入門の森を見る 初心者歓迎!動画×プロジェクト一式で本格ゲーム制作を学べる
連携攻撃システムの実装

連携攻撃は、複数のユニットが同時に攻撃します。
実装方法を紹介します。
連携攻撃の実装
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
using UnityEngine; using System.Collections; using System.Collections.Generic; public class ComboAttackSystem : MonoBehaviour { public IEnumerator ExecuteComboAttack(List<Unit> attackers, Unit defender) { int totalDamage = 0; float comboMultiplier = 1.0f; // 連携ボーナスを計算 if (attackers.Count > 1) { comboMultiplier = 1.0f + (attackers.Count - 1) * 0.15f; // 1人増えるごとに15%増 } // 各ユニットが順番に攻撃 foreach (var attacker in attackers) { int baseDamage = attacker.stats.attack - defender.stats.defense; baseDamage = Mathf.Max(1, baseDamage); int damage = Mathf.RoundToInt(baseDamage * comboMultiplier); totalDamage += damage; // 攻撃アニメーション yield return StartCoroutine(PlayAttackAnimation(attacker, defender)); // ダメージテキスト表示 ShowDamageText(defender.transform.position, damage); yield return new WaitForSeconds(0.3f); } // 最終ダメージを適用 defender.TakeDamage(totalDamage); } IEnumerator PlayAttackAnimation(Unit attacker, Unit defender) { // 攻撃アニメーション yield return new WaitForSeconds(0.5f); } void ShowDamageText(Vector3 position, int damage) { // ダメージテキストを表示 } } |
このコードで、連携攻撃システムが実装できます。
複数のユニットが順番に攻撃し、連携ボーナスが適用されます。
Unity入門の森を見る 初心者歓迎!動画×プロジェクト一式で本格ゲーム制作を学べる
周回要素の実装

周回要素は、ゲームを繰り返しプレイする動機になります。
実装方法を紹介します。
周回システムの実装
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
using UnityEngine; [System.Serializable] public class NewGamePlusData { public int cycle = 1; // 周回数 public float expMultiplier = 1.2f; // 経験値倍率 public float goldMultiplier = 1.5f; // お金倍率 public bool keepItems = true; // アイテム保持 public bool keepLevels = false; // レベル保持 } public class NewGamePlusSystem : MonoBehaviour { public NewGamePlusData ngpData = new NewGamePlusData(); public void StartNewGamePlus() { ngpData.cycle++; // 経験値倍率を更新 ngpData.expMultiplier = 1.0f + (ngpData.cycle * 0.2f); ngpData.goldMultiplier = 1.0f + (ngpData.cycle * 0.5f); // データを保存 SaveNewGamePlusData(); // 新しいゲームを開始 StartNewGame(); } public int CalculateExp(int baseExp) { return Mathf.RoundToInt(baseExp * ngpData.expMultiplier); } public int CalculateGold(int baseGold) { return Mathf.RoundToInt(baseGold * ngpData.goldMultiplier); } void SaveNewGamePlusData() { // セーブデータに保存 } void StartNewGame() { // 新しいゲームを開始 // アイテムやレベルを保持する場合は、ここで復元 } } |
このコードで、周回要素が実装できます。
周回数に応じて、経験値とお金の倍率が増加します。
✅ 周回要素のポイント
- 経験値倍率:周回ごとに20%増加
- お金倍率:周回ごとに50%増加
- アイテム保持:周回後もアイテムを保持
- 新要素の追加:周回ごとに新しい要素を追加
Unity入門の森を見る 初心者歓迎!動画×プロジェクト一式で本格ゲーム制作を学べる
実装例:完全なディスガイア風システム

実際に使える、完全なディスガイア風システムの実装例を紹介します。
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
using UnityEngine; public class CompleteDisgaeaStyleSystem : MonoBehaviour { [Header("システム")] public DisgaeaStyleLeveling levelingSystem; public LiftThrowSystem liftThrowSystem; public ComboAttackSystem comboAttackSystem; public NewGamePlusSystem ngpSystem; public void ProcessBattle(List<Unit> attackers, Unit defender) { // 1. 連携攻撃を実行 StartCoroutine(comboAttackSystem.ExecuteComboAttack(attackers, defender)); // 2. 経験値を獲得(周回倍率を適用) int exp = CalculateExp(100); foreach (var attacker in attackers) { levelingSystem.GainExperience(attacker, exp); } } int CalculateExp(int baseExp) { return ngpSystem.CalculateExp(baseExp); } } |
このコードで、完全なディスガイア風システムが実装できます。
超インフレ育成、持ち上げ投げ、連携攻撃、周回要素を統合しています。
Unity入門の森を見る 初心者歓迎!動画×プロジェクト一式で本格ゲーム制作を学べる
よくある質問(FAQ)

Unity入門の森を見る 初心者歓迎!動画×プロジェクト一式で本格ゲーム制作を学べる
あなたのオリジナルゲーム、今年こそ完成させませんか?
RPG・アクション・ホラー…Unityで本格ゲームを作りたい人のための学習サイトです。
実際に完成するゲームを題材に、
ソースコード・素材・プロジェクト一式をすべて公開。
仕事や学校の合間の1〜2時間でも、
「写経→改造」で自分のゲームまで作りきれる環境です。
まとめ

ディスガイア風SRPGは、超インフレ育成と周回要素が核心です。
これらの要素を実装すれば、やり込み要素が増えます。
✅ 今日から始める3ステップ
- ステップ1:超インフレ育成システムを実装する(所要3時間)
- ステップ2:持ち上げ投げシステムを実装する(所要2時間)
- ステップ3:周回要素を実装する(所要3時間)
本格的にUnityを学びたい方は、Unity入門の森で実践的なスキルを身につけましょう。
あなたのペースで、少しずつ進めていけば大丈夫です。
Unity入門の森を見る 初心者歓迎!動画×プロジェクト一式で本格ゲーム制作を学べる



コメント