Ejemplo n.º 1
0
    public void AddEnchantment(MapEnchantment ench)
    {
        if (MapEnchantments.Count > 0) //our enchantment limit, we'll remove the oldest one, trigger all the end enchantment stuff
        {
            RemoveEnchantment(MapEnchantments[0]);
            MapEnchantments.RemoveAt(0);
        }

        MapEnchantments.Add(ench);
        InitEnchantment(ench);
    }
Ejemplo n.º 2
0
    public override DatabaseEntry Copy()
    {
        MapEnchantment temp = new MapEnchantment(key);

        if (actorEffect != null)
        {
            temp.actorEffect = actorEffect.Copy();
        }

        if (tileEffect != null)
        {
            temp.tileEffect = tileEffect.Copy();
        }

        temp.bg_color_gradient_itd = bg_color_gradient_itd;

        return(temp);
    }
Ejemplo n.º 3
0
    public void RemoveEnchantment(MapEnchantment enchantment)
    {
        List <Actor> actors = Globals.GetBoardManager().spawner.actors;

        Globals.GetBoardManager().ui.backgroundContoller.NewColor(enchantment.bg_color_gradient_itd);

        foreach (Actor actor in actors)
        {
            enchantment.RemoveActorEffects(actor);
        }

        TileNode[,] tilenodes = Globals.GetBoardManager().pathfinding.tiles;

        foreach (TileNode node in tilenodes)
        {
            enchantment.RemoveTileEffect(node);
        }
    }
 public WorldEnchantmentCombatNode(Actor source, TileNode targetedTile, string enchantmentKeyToAdd)
     : base(source, targetedTile)
 {
     enchantment = Globals.campaign.GetMapDataContainer().MapEnchantmentsDB.GetCopy(enchantmentKeyToAdd);
 }
Ejemplo n.º 5
0
    public void AddEnchantment(string MapEnchantmentKey)
    {
        MapEnchantment enchantment = Globals.campaign.GetMapDataContainer().MapEnchantmentsDB.GetCopy(MapEnchantmentKey);

        AddEnchantment(enchantment);
    }