public static Actor Create(ActorType type,int r,int c,TiebreakerAssignment tiebreaker) { Actor a = null; if(M.actor[r,c] == null){ a = new Actor(proto[type],r,c); M.actor[r,c] = a; switch(tiebreaker){ case TiebreakerAssignment.AtEnd: { tiebreakers.Add(a); Event e = new Event(a,a.Speed(),EventType.MOVE); e.tiebreaker = tiebreakers.Count - 1; //since it's the last one Q.Add(e); break; } case TiebreakerAssignment.InsertAfterCurrent: { tiebreakers.Insert(Q.Tiebreaker + 1,a); Q.UpdateTiebreaker(Q.Tiebreaker + 1); Event e = new Event(a,a.Speed(),EventType.MOVE); e.tiebreaker = Q.Tiebreaker + 1; Q.Add(e); break; } case TiebreakerAssignment.UseCurrent: { tiebreakers[Q.Tiebreaker] = a; a.QS(); break; } } if(R.OneIn(10) && a.Is(ActorType.SWORDSMAN,ActorType.BERSERKER,ActorType.ENTRANCER,ActorType.DERANGED_ASCETIC,ActorType.ALASI_BATTLEMAGE,ActorType.ALASI_SCOUT, ActorType.ALASI_SENTINEL,ActorType.ALASI_SOLDIER,ActorType.PYREN_ARCHER,ActorType.NECROMANCER)){ a.light_radius = 4; } if(a.light_radius > 0){ a.UpdateRadius(0,a.light_radius); } } return a; }