diff --git a/docs/temp/m.html b/docs/temp/m.html new file mode 100644 index 0000000..ef0e41b --- /dev/null +++ b/docs/temp/m.html @@ -0,0 +1,63 @@ + + + + m + + + + +

Monster

+

Enemy character manager for combat in the game.

+ +

Class: Monster

+

The Monster class is responsible for managing the attributes and actions of enemy characters during combat scenarios.

+ +

Constructor

+

Initializes the Monster object with the specified attributes.

+
Constructor(self, animation, name: str, hp: int, at: int, df: int, act_options: list[str] = [])
+

Arguments

+ + +

hurt

+

Reduces the monster's health points due to damage.

+
hurt(self, damage: int)
+

Arguments

+ + +

heal

+

Restores health points to the monster.

+
heal(self, num: int)
+

Arguments

+ + +

Hooks

+

hook_registrations: events

+

Usage:

+

+@monster_object.events
+def available_hook_name(arg1, arg2, ...) -> return_type:
+    # code here
+        
+

Note that their should not be a 'self' argument in the hook function.

+

Hooks List:

+

on_act

+

When the player use ACT, targeted to the current monster.

+
on_act(self, name: str) -> list[str] | None
+

Arguments

+ + + + diff --git a/docs/temp/p.html b/docs/temp/p.html index 135b3e1..46230c7 100644 --- a/docs/temp/p.html +++ b/docs/temp/p.html @@ -1,7 +1,7 @@ - Player Class Documentation + p @@ -25,9 +25,24 @@

Constructor

  • wd_time: The time being unattackable after being attacked. (Some attack may disable it.) Default is 20.
  • +

    write_data

    +

    Copies attributes from another Player object. (used for overworld-connection)

    +
    write_data(self, p)
    +

    Arguments

    + +

    Hooks

    hook_registrations: events

    - +

    Usage:

    +
    
    +@player_object.events
    +def available_hook_name(arg1, arg2, ...) -> return_type:
    +    # code here
    +        
    +

    Note that their should not be a 'self' argument in the hook function.

    +

    Hooks List:

    on_attack

    When attack and hurt somebody.

    on_attack(self, damage: int, target: Monster) -> int | None | str
    @@ -83,23 +98,5 @@

    hurt

  • hp: The amount of health points to reduce.
  • -

    st_wd

    -

    Sets the wait time for the player.

    -
    st_wd(self)
    - -

    update

    -

    Updates the player's state, including reducing the wait time.

    -
    update(self)
    - -

    write_data

    -

    Copies attributes from another Player object.

    -
    write_data(self, p)
    -

    Arguments

    - - -

    Usage

    -

    The Player class is integral to the combat system, handling all player-related actions and attributes. Ensure all necessary hooks are set up before engaging in combat.

    diff --git a/docs/temp/up.html b/docs/temp/up.html index 1560320..271f9d9 100644 --- a/docs/temp/up.html +++ b/docs/temp/up.html @@ -11,7 +11,7 @@

    UnderPython

    WARNING: This doc is only for underpython alpha 1.0! Credits and others may be changed!

    This is a temporary doc, and it will be updated later.

    But I just got an AI assistant that can help me with this doc.

    -

    Last updated: 2024-7-9

    +

    Last updated: 2024-7-12

    UnderPython is a python module of making undertale encounters and overworld, able to handle many conditions.

    UnderPython is based on Pygame and diff --git a/docs/temp_zhcn/style.css b/docs/temp_zhcn/style.css new file mode 100644 index 0000000..7d970a5 --- /dev/null +++ b/docs/temp_zhcn/style.css @@ -0,0 +1,15 @@ +:root +{ + font-size: larger; +} +pre +{ + font-size: medium; + padding: 10px; + margin: 10px; + background-color: #f2f2f2; + color:black; + border-radius: 5px; + font-family: monospace; + +} \ No newline at end of file diff --git a/docs/temp_zhcn/up.html b/docs/temp_zhcn/up.html index 98719c7..eb998aa 100644 --- a/docs/temp_zhcn/up.html +++ b/docs/temp_zhcn/up.html @@ -11,7 +11,7 @@

    UnderPython

    警告:此文档仅适用于 UnderPython alpha 1.0!版权和其他可爱内容可能会更改!

    懒得写,就只搞了个模板。

    但是有AI哈哈哈哈

    -

    上次更新:2024-7-9

    +

    上次更新:2024-7-12

    UnderPython 是一个用于制作 Undertale 战斗和背景移动的 Python 模块, 非常的好啊。

    UnderPython 基于 Pygame