#!~/.pyenv/versions/3.11.6/bin/python
#
# Copyright (c) 2024 Cutieguwu | Olivia Brooks
#
# -*- coding:utf-8 -*-
# @Title: Intro to Pygame.
# @Author: Cutieguwu | Olivia Brooks
# @Email: owen.brooks77@gmail.com | obroo2@ocdsb.ca
# @Description: Effects for entities.
#
# @Script: effect.py
# @Date Created: 11 Jun, 2024
# @Last Modified: 11 Jun, 2024
# @Last Modified by: Cutieguwu | Olivia Brooks
# ----------------------------------------------------------

from pygame.image import load
from pygame.transform import scale
from lib.system import DIRWORKING

class War_Paint():
    def __init__(self, game, character):
        """
        War paint for player.
        """

        self.GAME = game

        self.imagePaths = {}
        self.images = {}
        
        self.update_images(character)

    def function():
        """
        War Paint is just a texture effect.
        """

        pass

    def update_images(self, character):
        """
        Updates effect images.
        """

        for key in ["neutral_1", "neutral_2", "run_l_1", "run_l_2", "run_r_1", "run_r_2", "run_u_1", "run_u_2", "run_d_1", "run_d_2"]:
            self.imagePaths[key] = DIRWORKING + f"/data/image/game/player/{character}/war_paint/{key}.png"

        for key, value in self.imagePaths.items():
            self.images[key] = load(self.imagePaths[key]).convert_alpha()
            self.images[key] = scale(self.images[key], (self.GAME.SCALE.unitBlockPx, self.GAME.SCALE.unitBlockPx))