Skip to content

Commit

Permalink
tweaked magicBook to be balanced powerful
Browse files Browse the repository at this point in the history
  • Loading branch information
hackerspacevr committed Feb 19, 2018
1 parent dc44705 commit 6be2db2
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 22 deletions.
26 changes: 13 additions & 13 deletions Assets/MagicBook/Prefabs/Spells/Fireball/FireRange.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
m_IsActive: 0
--- !u!1 &1732161132606102
GameObject:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -253,7 +253,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
fireEffect: {fileID: 199894523801454330}
smokeEffect: {fileID: 198456965011063730}
attackDamage: 15
attackDamage: 0
totalBurnDuration: 3
--- !u!135 &135792272438208660
SphereCollider:
Expand Down Expand Up @@ -1025,7 +1025,7 @@ ParticleSystem:
m_Curve:
- serializedVersion: 2
time: 0
value: 0.18324476
value: 0
inSlope: -0.07575034
outSlope: -0.07575034
tangentMode: 0
Expand Down Expand Up @@ -1275,9 +1275,9 @@ ParticleSystem:
maxGradient:
serializedVersion: 2
key0: {r: 1, g: 1, b: 1, a: 0}
key1: {r: 1, g: 1, b: 1, a: 0.7764706}
key2: {r: 0, g: 0, b: 0, a: 0.75686276}
key3: {r: 0, g: 0, b: 0, a: 0}
key1: {r: 1, g: 1, b: 1, a: 0.4890443}
key2: {r: 0, g: 0, b: 0, a: 0.7764706}
key3: {r: 0, g: 0, b: 0, a: 0.75686276}
key4: {r: 0, g: 0, b: 0, a: 0}
key5: {r: 0, g: 0, b: 0, a: 0}
key6: {r: 0, g: 0, b: 0, a: 0}
Expand All @@ -1291,16 +1291,16 @@ ParticleSystem:
ctime6: 0
ctime7: 0
atime0: 0
atime1: 11180
atime2: 32575
atime3: 65535
atime4: 0
atime1: 15420
atime2: 34888
atime3: 48766
atime4: 65535
atime5: 0
atime6: 0
atime7: 0
m_Mode: 0
m_NumColorKeys: 2
m_NumAlphaKeys: 4
m_NumAlphaKeys: 5
minGradient:
serializedVersion: 2
key0: {r: 1, g: 1, b: 1, a: 1}
Expand Down Expand Up @@ -3733,7 +3733,7 @@ ParticleSystem:
moveWithTransform: 0
moveWithCustomTransform: {fileID: 0}
scalingMode: 0
randomSeed: -486847166
randomSeed: 622838997
InitialModule:
serializedVersion: 3
enabled: 1
Expand Down Expand Up @@ -6359,7 +6359,7 @@ ParticleSystem:
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
maxLights: 4
maxLights: 7
TrailModule:
enabled: 0
mode: 0
Expand Down
4 changes: 2 additions & 2 deletions Assets/MagicBook/Prefabs/Spells/Fireball/FireSmoke.mat
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Material:
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: FireSmoke
m_Shader: {fileID: 203, guid: 0000000000000000f000000000000000, type: 0}
m_Shader: {fileID: 202, guid: 0000000000000000f000000000000000, type: 0}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
Expand Down Expand Up @@ -73,7 +73,7 @@ Material:
- _GlossMapScale: 1
- _Glossiness: 0.5
- _GlossyReflections: 1
- _InvFade: 3
- _InvFade: 0.1
- _LightingEnabled: 1
- _Metallic: 0
- _Mode: 0
Expand Down
15 changes: 14 additions & 1 deletion Assets/MagicBook/Prefabs/Spells/Fireball/Fireball.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ GameObject:
- component: {fileID: 54785709522886298}
- component: {fileID: 82270390973700498}
- component: {fileID: 114380002433175008}
- component: {fileID: 65590007657417784}
m_Layer: 0
m_Name: Fireball
m_TagString: Untagged
Expand Down Expand Up @@ -164,6 +165,18 @@ Rigidbody:
m_Interpolate: 0
m_Constraints: 0
m_CollisionDetection: 0
--- !u!65 &65590007657417784
BoxCollider:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1740384599701424}
m_Material: {fileID: 0}
m_IsTrigger: 1
m_Enabled: 0
serializedVersion: 2
m_Size: {x: 0.5, y: 0.5, z: 4}
m_Center: {x: 0, y: 0, z: -2}
--- !u!82 &82270390973700498
AudioSource:
m_ObjectHideFlags: 1
Expand Down Expand Up @@ -321,7 +334,7 @@ MonoBehaviour:
delayBetweenSpawns: 1
playerHoldScalingDuration: 6
speed: 14
damage: 15
damage: 10
maxAdditionalDamage: 30
pointLight: {fileID: 108569519831283328}
FireRangePrefab: {fileID: 1673509378881658, guid: 1f33a090d0a27e74f954abe39f8629cf,
Expand Down
4 changes: 2 additions & 2 deletions Assets/MagicBook/Prefabs/Spells/Iceball/SlowRange.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,8 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 052ce98025f80b144adf563b6fc44a54, type: 3}
m_Name:
m_EditorClassIdentifier:
slowAmount: 0.5
slowDuration: 8
slowAmount: 0.7
slowDuration: 7
--- !u!135 &135285023128030578
SphereCollider:
m_ObjectHideFlags: 1
Expand Down
2 changes: 1 addition & 1 deletion Assets/MagicBook/Scripts/MagicBook_Animation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ void Update()
gestureTotalMoved = Vector2.zero;
}
gestureTotalMoved += diff;
if (gestureTotalMoved.magnitude > 0.65f && gestureTimeSpent < 0.3f) // if the gesture is so fast and so long.
if (gestureTotalMoved.magnitude > 0.5f && gestureTimeSpent < 0.33f) // if the gesture is so fast and so long.
{
var dir = Mathf.Sign(gestureTotalMoved.x) == 1 ? "right" : "left";
isSwiped = true;
Expand Down
6 changes: 4 additions & 2 deletions Assets/MagicBook/Scripts/Spells/Fireball/Fireball.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ protected override void Update_Derived()
OnPlayerHoldSpell();
if (fired)
{

transform.Translate(direction * (speed * Time.deltaTime), Space.World);
// TODO: edit gravity of fireball to get the moving feel
}
Expand Down Expand Up @@ -62,6 +63,7 @@ public override void OnPlayerHoldSpell()

public override void Fire(Vector3 handDirection)
{
GetComponent<BoxCollider>().enabled = true;
transform.parent = null;
direction = handDirection;
fired = true;
Expand Down Expand Up @@ -102,8 +104,8 @@ void OnTriggerEnter(Collider collider)
fireRange.GetComponent<FireballRange>().attackDamage = damage;
fireRange.transform.position = transform.position;
PlayImpactSound();
print("damage:" + damage.ToString());
print("radius:" + damageRadius.ToString());
//print("damage:" + damage.ToString());
//print("radius:" + damageRadius.ToString());
Destroy(gameObject);
}

Expand Down
4 changes: 3 additions & 1 deletion Assets/MagicBook/Scripts/Spells/Iceball/SlowRange.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public class SlowRange : MonoBehaviour
private float increaseDuration = 2f;
private float staticDuration = 2f;

public float slowAmount = 0.5f; // slow till speed percentage (0.1 = 10%) on enemy hit
public float slowAmount = 0.7f; // slow till speed percentage (0.1 = 10%) on enemy hit
public float slowDuration = 8f; //slow for seconds

private static List<Enemy> allSlowedEnemies = new List<Enemy>();
Expand Down Expand Up @@ -81,6 +81,8 @@ void AddEffectToEnemy(Enemy enemy)

void RemoveEffectOnEnemy(Enemy enemy)
{
if (enemy == null)
return;
var navMesh = enemy.GetComponent<NavMeshAgent>();
navMesh.speed /= slowAmount;
}
Expand Down

1 comment on commit 6be2db2

@hackerspacevr
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also updated the swipe listener to be more responsive

Please sign in to comment.